IDeviceActionReceiver
public
interface
IDeviceActionReceiver
| com.android.tradefed.device.IDeviceActionReceiver |
Provides an API to receive device events.
NOTE: This is currently supported for metric collectors only.
Summary
Public methods | |
|---|---|
default
boolean
|
isDisabledReceiver()
Whether the |
abstract
void
|
rebootEnded(ITestDevice device)
Gets notification when the reboot ended in device. |
abstract
void
|
rebootStarted(ITestDevice device)
Gets notification when reboot started in device. |
abstract
void
|
setDisableReceiver(boolean isDisabled)
Sets whether the |
Public methods
isDisabledReceiver
public boolean isDisabledReceiver ()
Whether the IDeviceActionReceiver is disabled or not.
| Returns | |
|---|---|
boolean |
return true if disabled, false otherwise. |
rebootEnded
public abstract void rebootEnded (ITestDevice device)
Gets notification when the reboot ended in device.
NOTE: Receivers should avoid rebooting during this callback. Any reboot attempt will be ignored.
| Parameters | |
|---|---|
device |
ITestDevice: ITestDevice where the reboot ended. |
| Throws | |
|---|---|
DeviceNotAvailableException |
|
rebootStarted
public abstract void rebootStarted (ITestDevice device)
Gets notification when reboot started in device.
NOTE: Receivers should avoid rebooting during this callback. Any reboot attempt will be ignored.
| Parameters | |
|---|---|
device |
ITestDevice: ITestDevice where the reboot started. |
| Throws | |
|---|---|
DeviceNotAvailableException |
|
setDisableReceiver
public abstract void setDisableReceiver (boolean isDisabled)
Sets whether the IDeviceActionReceiver should be disabled. Disabling means it will
not be registered to the device for receiving device action events.
| Parameters | |
|---|---|
isDisabled |
boolean |