使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。

IManagedTestDevice

public interface IManagedTestDevice
implements ITestDevice

com.android.tradefed.device.IManagedTestDevice


生命周期受管理的 ITestDevice。

概括

嵌套类

class IManagedTestDevice.DeviceEventResponse

响应IManagedTestDevice#handleAllocationEvent(DeviceEvent)调用的容器

公共方法

abstract DeviceAllocationState getAllocationState ()

返回设备当前的分配状态

abstract Process getEmulatorProcess ()

返回此模拟器对应的Process

abstract String getFastbootPath ()

返回正在使用的 fastboot 二进制文件的路径。

abstract String getFastbootVersion ()

返回正在使用的 fastboot 二进制文件的版本字符串。

abstract String getMacAddress ()

返回设备的MAC地址,如果从设备查询失败则返回null。

abstract IDeviceStateMonitor getMonitor ()

返回与设备关联的IDeviceStateMonitor

abstract String getSimOperator ()

如果不可用或设备不可用,则返回 SIM 卡运营商或 null。

abstract String getSimState ()

如果不可用或设备不可用,则返回 SIM 卡状态或 null。

abstract IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

处理给定的DeviceEvent

abstract boolean isFastbootEnabled ()

如果设备可以使用 fastboot,则返回。

abstract boolean recoverDevice ()

在设备上调用恢复。

abstract void setDeviceState ( TestDeviceState deviceState)

更新设备的状态。

abstract void setEmulatorProcess (Process p)

当此设备是模拟器时,设置Process

abstract void setFastbootEnabled (boolean fastbootEnabled)

设置设备的快速启动选项。

abstract void setFastbootPath (String fastbootPath)

设置应该使用的 fastboot 二进制文件的路径。

abstract void setIDevice (IDevice device)

更新与此 ITestDevice 关联的 IDevice。

公共方法

获取分配状态

public abstract DeviceAllocationState getAllocationState ()

返回设备当前的分配状态

退货
DeviceAllocationState

获取模拟器进程

public abstract Process getEmulatorProcess ()

返回此模拟器对应的Process

退货
Process Processnull

获取快速启动路径

public abstract String getFastbootPath ()

返回正在使用的 fastboot 二进制文件的路径。仍然需要isFastbootEnabled()为真,才能启用快速启动功能。

退货
String

获取快速启动版本

public abstract String getFastbootVersion ()

返回正在使用的 fastboot 二进制文件的版本字符串。如果出现问题,则为 null。

退货
String

获取Mac地址

public abstract String getMacAddress ()

返回设备的MAC地址,如果从设备查询失败则返回null。

退货
String

获取监视器

public abstract IDeviceStateMonitor getMonitor ()

返回与设备关联的IDeviceStateMonitor

退货
IDeviceStateMonitor

获取SimOperator

public abstract String getSimOperator ()

如果不可用或设备不可用,则返回 SIM 卡运营商或 null。

退货
String

得到模拟状态

public abstract String getSimState ()

如果不可用或设备不可用,则返回 SIM 卡状态或 null。

退货
String

处理分配事件

public abstract IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

处理给定的DeviceEvent 。可以将设备转换到新状态。将通知IDeviceMonitor任何状态转换。

参数
event DeviceEvent

退货
IManagedTestDevice.DeviceEventResponse

isFastbootEnabled

public abstract boolean isFastbootEnabled ()

如果设备可以使用 fastboot,则返回。

退货
boolean

恢复设备

public abstract boolean recoverDevice ()

在设备上调用恢复。

退货
boolean如果恢复尝试并成功,则返回 True,如果跳过恢复,则返回 False

投掷
DeviceNotAvailableException如果恢复不成功

设置设备状态

public abstract void setDeviceState (TestDeviceState deviceState)

更新设备的状态。

参数
deviceState TestDeviceStateTestDeviceState

设置模拟器进程

public abstract void setEmulatorProcess (Process p)

当此设备是模拟器时,设置Process

参数
p Process

setFastbootEnabled

public abstract void setFastbootEnabled (boolean fastbootEnabled)

设置设备的快速启动选项。应在首次分配设备时设置。

参数
fastbootEnabled boolean : 设备是否可以使用 fastboot

设置快速启动路径

public abstract void setFastbootPath (String fastbootPath)

设置应该使用的 fastboot 二进制文件的路径。仍然需要isFastbootEnabled()为真,才能启用快速启动功能。

参数
fastbootPath String

设置设备

public abstract void setIDevice (IDevice device)

更新与此 ITestDevice 关联的 IDevice。

新的 IDevice 必须引用与当前引用相同的物理设备。如果 DDMS 分配了新的 IDevice,将调用此方法

参数
device IDeviceIDevice