IDeviceMonitor
public interface IDeviceMonitor
com.android.tradefed.device.IDeviceMonitor |
Antarmuka untuk memantau status perangkat. Dimaksudkan untuk diteruskan ke IDeviceManager
contoh, di mana titik IDeviceManager
akan memanggil callback sebagai peristiwa terkait dipicu. Setiap caching atau batching kebutuhan yang akan dilakukan dalam IDeviceMonitor
misalnya.
Ringkasan
Kelas bersarang | |
---|---|
class | IDeviceMonitor.DeviceLister Sebuah |
Metode publik | |
---|---|
abstract void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) Sinyal |
abstract void | run () Metode yang akan dipanggil setelah semua bidang @Option Monitor telah disetel. |
abstract void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) Memungkinkan |
abstract void | stop () Metode yang akan dipanggil saat Monitor perlu dihentikan. |
Metode publik
notifyDeviceStateChange
public abstract void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
Sinyal IDeviceMonitor
bahwa negara perangkat telah berubah. Implementasi monitor harus membatasi jumlah pemrosesan dan interaksi IDeviceManager/DeviceLister yang mereka lakukan dalam metode ini.
Parameter | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
Lari
public abstract void run ()
Metode yang akan dipanggil setelah semua bidang @Option Monitor telah disetel.
setDeviceLister
public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)
Memungkinkan DeviceLister
harus ditetapkan. Setelah upaya berhasil untuk mengatur Lister, implementasi dapat membuang semua upaya berikutnya.
Parameter | |
---|---|
lister | IDeviceMonitor.DeviceLister |
berhenti
public abstract void stop ()
Metode yang akan dipanggil saat Monitor perlu dihentikan.
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 2021-10-04 UTC.