CompanionAllocator

public abstract class CompanionAllocator
extends BaseTargetPreparer

java.lang.Object 中
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.companion.CompanionAllocator


负责分配和释放配套设备的基类

应实现getCompanionDeviceSelectionOptions()来描述条件 分配配套设备所需的步骤

摘要

公共构造函数

CompanionAllocator()

公共方法

void setUp(ITestDevice device, IBuildInfo buildInfo)

设置设备。

void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)

受保护的方法

abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions()

描述配套设备的 DeviceSelectionOptions

公共构造函数

CompanionAllocator

public CompanionAllocator ()

公共方法

设置

public void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

设置设备。

此方法的内部实现将请求配套设备,并进行分配。

参数
device ITestDevice

buildInfo IBuildInfo

抛出
BuildError
DeviceNotAvailableException
TargetSetupError

拆解

public void tearDown (ITestDevice device, 
                IBuildInfo buildInfo, 
                Throwable e)

参数
device ITestDevice

buildInfo IBuildInfo

e Throwable

抛出
DeviceNotAvailableException

受保护的方法

getCompanionDeviceSelectionOptions

protected abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions ()

描述配套设备的 DeviceSelectionOptions

返回
DeviceSelectionOptions