CompanionAllocator
public
abstract
class
CompanionAllocator
extends BaseTargetPreparer
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.companion.CompanionAllocator |
Base class that takes care of allocating and freeing companion device
getCompanionDeviceSelectionOptions()
should be implemented to describe the criteria
needed to allocate the companion device
Summary
Public constructors | |
---|---|
CompanionAllocator()
|
Public methods | |
---|---|
void
|
setUp(ITestDevice device, IBuildInfo buildInfo)
Sets up the device. |
void
|
tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
|
Protected methods | |
---|---|
abstract
DeviceSelectionOptions
|
getCompanionDeviceSelectionOptions()
Describe the |
Public constructors
CompanionAllocator
public CompanionAllocator ()
Public methods
setUp
public void setUp (ITestDevice device, IBuildInfo buildInfo)
Sets up the device.
Internal implementation of this method will request a companion device, and allocate it.
Parameters | |
---|---|
device |
ITestDevice |
buildInfo |
IBuildInfo |
Throws | |
---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
tearDown
public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)
Parameters | |
---|---|
device |
ITestDevice |
buildInfo |
IBuildInfo |
e |
Throwable |
Throws | |
---|---|
DeviceNotAvailableException |
Protected methods
getCompanionDeviceSelectionOptions
protected abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions ()
Describe the DeviceSelectionOptions
for the companion device
Returns | |
---|---|
DeviceSelectionOptions |