IDeviceMonitor
public
interface
IDeviceMonitor
| com.android.tradefed.device.IDeviceMonitor |
用於監控裝置狀態的介面。應傳遞至 IDeviceManager 例項,此時 IDeviceManager 會在相關事件觸發時叫用回呼。任何快取或批次作業都必須在 IDeviceMonitor 例項中執行。
摘要
巢狀類別 | |
|---|---|
class |
IDeviceMonitor.DeviceLister
類似 |
公用方法 | |
|---|---|
abstract
void
|
notifyDeviceStateChange(String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
向 |
abstract
void
|
run()
在設定完所有監控器的 @Option 欄位後,系統會呼叫這個方法。 |
abstract
void
|
setDeviceLister(IDeviceMonitor.DeviceLister lister)
允許設定 |
abstract
void
|
stop()
當需要停止監控時,系統會呼叫這個方法。 |
公用方法
notifyDeviceStateChange
public abstract void notifyDeviceStateChange (String serial,
DeviceAllocationState oldState,
DeviceAllocationState newState)向 IDeviceMonitor 發出裝置狀態已變更的信號。監控實作項目應限制在這個方法中執行的處理量和 IDeviceManager/DeviceLister 互動。
| 參數 | |
|---|---|
serial |
String |
oldState |
DeviceAllocationState |
newState |
DeviceAllocationState |
得分
public abstract void run ()
在設定所有監控器的 @Option 欄位後,系統會呼叫這個方法。
setDeviceLister
public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允許設定 DeviceLister。設定 Lister 成功後,實作項目可能會捨棄所有後續嘗試。
| 參數 | |
|---|---|
lister |
IDeviceMonitor.DeviceLister |
轉機 1 次
public abstract void stop ()
當需要停止監控時,系統會呼叫這個方法。