管理远程设备

public class ManagedRemoteDevice
extends TestDevice implements ITestLoggerReceiver

java.lang.Object
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.cloud.ManagedRemoteDevice


在虚拟机内运行的设备,我们通过虚拟机内的 Tradefed 实例进行远程管理。

概括

公共构造函数

ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

创建一个ManagedRemoteDevice

公共方法

TestDeviceOptions getOptions ()

在尝试进行远程设置之前,覆盖基本 getter 以便能够解析动态选项。

void postInvocationTearDown (Throwable exception)

设备特定所需清理的额外步骤将在调用完成后执行。

void preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes)

设备特定所需设置的额外步骤将在调用流程之前在设备上执行。

公共构造函数

管理远程设备

public ManagedRemoteDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

创建一个ManagedRemoteDevice

参数
device IDevice :关联的IDevice

stateMonitor IDeviceStateMonitor :要使用的IDeviceStateMonitor机制

allocationMonitor IDeviceMonitor :通知分配状态更改的IDeviceMonitor

公共方法

获取选项

public TestDeviceOptions getOptions ()

在尝试进行远程设置之前,覆盖基本 getter 以便能够解析动态选项。

退货
TestDeviceOptions TestDeviceOptions与被测设备相关。

调用后拆卸

public void postInvocationTearDown (Throwable exception)

设备特定所需清理的额外步骤将在调用完成后执行。

参数
exception Throwable :如果有的话,调用失败引发的最终异常。

调用前设置

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

设备特定所需设置的额外步骤将在调用流程之前在设备上执行。

参数
info IBuildInfo :设备的IBuildInfo

attributes MultiMap :存储在调用上下文中的属性

投掷
DeviceNotAvailableException
TargetSetupError