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