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)
|
公共方法 | |
---|---|
TestDeviceOptions
|
getOptions()
在尝试进行远程设置之前,替换基 getter 以便解析动态选项。 |
GceAvdInfo
|
getRemoteAvdInfo()
返回用于描述远程实例的 |
void
|
postInvocationTearDown(Throwable exception)
|
void
|
preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)
|
void
|
setTestLogger(ITestLogger testLogger)
|
受保护的方法 | |
---|---|
long
|
getCurrentTime()
返回当前系统时间。 |
void
|
launchGce()
根据 build 信息启动实际的 GCE 设备。 |
公共构造函数
ManagedRemoteDevice
public ManagedRemoteDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
参数 | |
---|---|
device |
IDevice :关联的 IDevice |
stateMonitor |
IDeviceStateMonitor :要使用的 IDeviceStateMonitor 机制 |
allocationMonitor |
IDeviceMonitor :用于通知分配状态变化的 IDeviceMonitor 。 |
公共方法
getOptions
public TestDeviceOptions getOptions ()
在尝试进行远程设置之前,请替换基本 getter,以便解析动态选项。
返回 | |
---|---|
TestDeviceOptions |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
参数 | |
---|---|
exception |
Throwable |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
参数 | |
---|---|
info |
IBuildInfo |
attributes |
MultiMap |
抛出 | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
参数 | |
---|---|
testLogger |
ITestLogger |
受保护的方法
getCurrentTime
protected long getCurrentTime ()
返回当前系统时间。公开以供测试。
返回 | |
---|---|
long |
launchGce
protected void launchGce ()
根据 build 信息启动实际的 GCE 设备。
抛出 | |
---|---|
TargetSetupError |