ManagedRemoteDevice

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

公共方法

void postInvocationTearDown(Throwable exception)

针对设备专用所需清理操作的额外步骤,将在调用完成后执行。

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

针对设备专用所需设置的额外步骤,这些步骤将在调用流程之前在设备上执行。

公共构造函数

ManagedRemoteDevice

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

创建 ManagedRemoteDevice

参数
device IDevice:关联的 IDevice

stateMonitor IDeviceStateMonitor:要使用的 IDeviceStateMonitor 机制

allocationMonitor IDeviceMonitor:用于通知分配状态变化的 IDeviceMonitor

公共方法

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

针对设备专用所需清理操作的额外步骤,将在调用完成后执行。

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

preInvocationSetup

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

针对设备专用所需设置的额外步骤,这些步骤将在调用流程之前在设备上执行。

参数
info IBuildInfo:设备的 IBuildInfo

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

抛出
DeviceNotAvailableException
TargetSetupError