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 true 在 waitTime 到期前,檢查是否成功。其他情況則為 false

擲回
DeviceNotAvailableException

waitForPmResponsive

protected boolean waitForPmResponsive (long waitTime)

等待裝置套件管理工具回應。

參數
waitTime long:等待放棄前所需的時間 (以毫秒為單位)

傳回
boolean true 如果套件管理器在 waitTime 到期前開始回應。其他情況則為 false