DeviceStateMonitor

public class DeviceStateMonitor
extends NativeDeviceStateMonitor

java.lang.Object
   ↳ com.android.tradefed.device.NativeDeviceStateMonitor
     ↳ com.android.tradefed.device.DeviceStateMonitor


用于监控 IDevice 状态的辅助类。

摘要

公共构造函数

DeviceStateMonitor(IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

受保护的方法

boolean postOnlineCheck(long waitTime)

对在线设备执行的其他检查

boolean waitForPmResponsive(long waitTime)

等待设备软件包管理器响应。

公共构造函数

DeviceStateMonitor

public DeviceStateMonitor (IDeviceManager mgr, 
                IDevice device, 
                boolean fastbootEnabled)

参数
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

受保护的方法

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

对在线设备执行的其他检查

参数
waitTime long:放弃之前等待的时间(以毫秒为单位)

返回
boolean 如果在 waitTime 过期之前检查成功,则返回 true。否则返回 false

抛出
DeviceNotAvailableException

waitForPmResponsive

protected boolean waitForPmResponsive (long waitTime)

等待设备软件包管理器响应。

参数
waitTime long:放弃之前等待的时间(以毫秒为单位)

返回
boolean 如果软件包管理在 waitTime 到期之前响应,则返回 true。 否则返回 false