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

公共方法

isDisabledReceiver

public boolean isDisabledReceiver ()

IDeviceActionReceiver 是否处于停用状态。

返回
boolean 如果已停用,则返回 true;否则返回 false。

rebootEnded

public abstract void rebootEnded (ITestDevice device)

在设备重启结束时收到通知。

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

参数
device ITestDevice:重新启动结束时的 ITestDevice

抛出
DeviceNotAvailableException

rebootStarted

public abstract void rebootStarted (ITestDevice device)

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

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

参数
device ITestDeviceITestDevice,重启开始的位置。

抛出
DeviceNotAvailableException

setDisableReceiver

public abstract void setDisableReceiver (boolean isDisabled)

设置是否应停用 IDeviceActionReceiver。如果停用,则不会注册到设备以接收设备操作事件。

参数
isDisabled boolean