IDeviceActionReceiver

public interface IDeviceActionReceiver

com.android.tradefed.device.IDeviceActionReceiver


提供API来接收设备事件。

注意:目前仅支持指标收集器。

概括

公共方法

default boolean isDisabledReceiver ()

IDeviceActionReceiver是否被禁用。

abstract void rebootEnded ( ITestDevice device)

当设备重新启动结束时获取通知。

abstract void rebootStarted ( ITestDevice device)

在设备中开始重新启动时获取通知。

abstract void setDisableReceiver (boolean isDisabled)

设置是否应禁用IDeviceActionReceiver

公共方法

禁用接收器

public boolean isDisabledReceiver ()

IDeviceActionReceiver是否被禁用。

退货
boolean如果禁用则返回 true,否则返回 false。

重启结束

public abstract void rebootEnded (ITestDevice device)

当设备重新启动结束时获取通知。

注意:接收器应避免在此回调期间重新启动。任何重新启动尝试都将被忽略。

参数
device ITestDevice :重启结束的ITestDevice

投掷
DeviceNotAvailableException

重新启动开始

public abstract void rebootStarted (ITestDevice device)

在设备中开始重新启动时获取通知。

注意:接收器应避免在此回调期间重新启动。任何重新启动尝试都将被忽略。

参数
device ITestDevice :重新启动开始的ITestDevice

投掷
DeviceNotAvailableException

设置禁用接收器

public abstract void setDisableReceiver (boolean isDisabled)

设置是否应禁用IDeviceActionReceiver 。禁用表示不会注册到设备上接收设备动作事件。

参数
isDisabled boolean