DeviceStateMonitor

public class DeviceStateMonitor
extends NativeDeviceStateMonitor

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


Helper class for monitoring the state of a IDevice.

Summary

Public constructors

DeviceStateMonitor(IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

Protected methods

boolean postOnlineCheck(long waitTime)

Additional checks to be done on an Online device

boolean waitForPmResponsive(long waitTime)

Waits for the device package manager to be responsive.

Public constructors

DeviceStateMonitor

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

Parameters
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

Protected methods

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

Additional checks to be done on an Online device

Parameters
waitTime long: time in ms to wait before giving up

Returns
boolean true if checks are successful before waitTime expires. false otherwise

waitForPmResponsive

protected boolean waitForPmResponsive (long waitTime)

Waits for the device package manager to be responsive.

Parameters
waitTime long: time in ms to wait before giving up

Returns
boolean true if package manage becomes responsive before waitTime expires. false otherwise