IDeviceMonitor
public interface IDeviceMonitor
com.android.tradefed.device.IDeviceMonitor |
Interfaccia per il monitoraggio dello stato dei dispositivi. Destinato a essere passato a un'istanza di IDeviceManager
, a quel punto IDeviceManager
invocherà i callback quando vengono attivati gli eventi correlati. Qualsiasi memorizzazione nella cache o batch deve essere eseguita all'interno dell'istanza IDeviceMonitor
.
Riepilogo
Classi nidificate | |
---|---|
class | IDeviceMonitor.DeviceLister Una classe simile a |
Metodi pubblici | |
---|---|
abstract void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) Segnala a |
abstract void | run () Un metodo che verrà chiamato dopo che tutti i campi @Option del Monitor sono stati impostati. |
abstract void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) Consente di impostare |
abstract void | stop () Un metodo che verrà chiamato quando è necessario arrestare Monitor. |
Metodi pubblici
notificaDeviceStateChange
public abstract void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Segnala a IDeviceMonitor
che uno stato del dispositivo è stato modificato. Le implementazioni di monitoraggio dovrebbero limitare la quantità di elaborazione e interazione IDeviceManager/DeviceLister che eseguono in questo metodo.
Parametri | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
correre
public abstract void run ()
Un metodo che verrà chiamato dopo che tutti i campi @Option del Monitor sono stati impostati.
setDeviceLister
public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Consente di impostare DeviceLister
. Dopo un tentativo riuscito di impostare il Lister, le implementazioni potrebbero ignorare tutti i tentativi successivi.
Parametri | |
---|---|
lister | IDeviceMonitor.DeviceLister |
fermare
public abstract void stop ()
Un metodo che verrà chiamato quando è necessario arrestare Monitor.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-15 UTC.