DeviceStateMonitor
public
class
DeviceStateMonitor
extends NativeDeviceStateMonitor
Known direct subclasses
NestedDeviceStateMonitor |
Device state monitor that executes extra checks on nested device to accommodate the specifics of
the virtualized environment.
|
|
Helper class for monitoring the state of a IDevice
.
Summary
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 |