IManagedTestDevice
public interface IManagedTestDevice
implements ITestDevice
com.android.tradefed.device.IManagedTestDevice |
一个管理其生命周期的ITestDevice。
概要
嵌套类 | |
---|---|
class | IManagedTestDevice.DeviceEventResponse 响应 |
公开方法 | |
---|---|
abstract DeviceAllocationState | getAllocationState () 返回设备的当前分配状态 |
abstract Process | getEmulatorProcess () 返回与此模拟器对应的 |
abstract String | getFastbootPath () 返回正在使用的fastboot二进制文件的路径。 |
abstract String | getFastbootVersion () 返回所使用的fastboot二进制文件的版本字符串。 |
abstract String | getMacAddress () 返回设备的MAC地址,如果无法从设备查询,则返回null。 |
abstractIDeviceStateMonitor | getMonitor () 返回与设备关联的 |
abstract String | getSimOperator () 返回SIM卡操作员;如果设备不可用,则返回null。 |
abstract String | getSimState () 返回SIM卡状态;如果设备不可用,则返回null。 |
abstract IManagedTestDevice.DeviceEventResponse | handleAllocationEvent (DeviceEvent event) 处理给定的 |
abstract boolean | isFastbootEnabled () 如果fastboot可用于该设备,则返回。 |
abstract void | recoverDevice () 调用设备上的恢复。 |
abstract void | setDeviceState ( TestDeviceState deviceState) 更新设备的状态。 |
abstract void | setEmulatorProcess (Process p) 当此设备是仿真器时,设置 |
abstract void | setFastbootEnabled (boolean fastbootEnabled) 设置设备的快速启动选项。 |
abstract void | setFastbootPath (String fastbootPath) 将路径设置为应使用的fastboot二进制文件。 |
abstract void | setIDevice (IDevice device) 更新与此ITestDevice关联的IDevice。 |
公开方法
getAllocationState
public abstract DeviceAllocationState getAllocationState ()
返回设备的当前分配状态
退货 | |
---|---|
DeviceAllocationState |
getEmulatorProcess
public abstract Process getEmulatorProcess ()
返回与此模拟器对应的Process
。
退货 | |
---|---|
Process | Process 或null |
getFastbootPath
public abstract String getFastbootPath ()
返回正在使用的fastboot二进制文件的路径。仍然要求isFastbootEnabled()
为true,才能启用快速启动功能。
退货 | |
---|---|
String |
getFastbootVersion
public abstract String getFastbootVersion ()
返回所使用的fastboot二进制文件的版本字符串。如果出现问题,则为null。
退货 | |
---|---|
String |
getMacAddress
public abstract String getMacAddress ()
返回设备的MAC地址,如果无法从设备查询,则返回null。
退货 | |
---|---|
String |
getMonitor
public abstract IDeviceStateMonitor getMonitor ()
返回与设备关联的IDeviceStateMonitor
。
退货 | |
---|---|
IDeviceStateMonitor |
getSimOperator
public abstract String getSimOperator ()
返回SIM卡操作员;如果设备不可用,则返回null。
退货 | |
---|---|
String |
getSimState
public abstract String getSimState ()
返回SIM卡状态;如果设备不可用,则返回null。
退货 | |
---|---|
String |
handleAllocationEvent
public abstract IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)
处理给定的DeviceEvent
。可以将设备转换为新状态。将任何状态转换通知IDeviceMonitor
。
参量 | |
---|---|
event | DeviceEvent |
退货 | |
---|---|
IManagedTestDevice.DeviceEventResponse |
isFastbootEnabled
public abstract boolean isFastbootEnabled ()
如果fastboot可用于该设备,则返回。
退货 | |
---|---|
boolean |
setDeviceState
public abstract void setDeviceState (TestDeviceState deviceState)
更新设备的状态。
参量 | |
---|---|
deviceState | TestDeviceState : TestDeviceState |
setEmulatorProcess
public abstract void setEmulatorProcess (Process p)
当此设备是模拟器时,设置Process
。
参量 | |
---|---|
p | Process |
setFastbootEnabled
public abstract void setFastbootEnabled (boolean fastbootEnabled)
设置设备的fastboot选项。应该在首次分配设备时设置。
参量 | |
---|---|
fastbootEnabled | boolean :fastboot是否可用于该设备 |
setFastbootPath
public abstract void setFastbootPath (String fastbootPath)
将路径设置为应使用的fastboot二进制文件。仍然要求isFastbootEnabled()
为true,才能启用快速启动功能。
参量 | |
---|---|
fastbootPath | String |
setIDevice
public abstract void setIDevice (IDevice device)
更新与此ITestDevice关联的IDevice。
新的IDevice必须引用与当前引用相同的物理设备。如果DDMS分配了新的IDevice,则将调用此方法参量 | |
---|---|
device | IDevice : IDevice |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.