IDeviceMonitor
public interface IDeviceMonitor
com.android.tradefed.device.IDeviceMonitor |
Cihazların durumunu izlemek için arayüz. Bir IDeviceManager
örneğine geçirilmek üzere tasarlanmıştır; bu noktada IDeviceManager
, ilgili olaylar tetiklendiğinde geri aramaları başlatır. Herhangi bir önbelleğe alma veya toplu işlem, IDeviceMonitor
örneği içinde gerçekleştirilmelidir.
Özet
iç içe sınıflar | |
---|---|
class | IDeviceMonitor.DeviceLister Bilinen aygıtları ve durumlarını döndürmesi gereken |
Genel yöntemler | |
---|---|
abstract void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) |
abstract void | run () Monitörün tüm @Option alanları ayarlandıktan sonra çağrılacak bir yöntem. |
abstract void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) |
abstract void | stop () Monitörün durdurulması gerektiğinde çağrılacak bir yöntem. |
Genel yöntemler
notifyDeviceStateDeğiştir
public abstract void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
IDeviceMonitor
bir cihaz durumunun değiştirildiğini bildirir. İzleme uygulamaları, bu yöntemde yaptıkları işleme miktarını ve IDeviceManager/DeviceLister etkileşimini sınırlamalıdır.
parametreler | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
koşmak
public abstract void run ()
Monitörün tüm @Option alanları ayarlandıktan sonra çağrılacak bir yöntem.
setDeviceLister
public abstract void setDeviceLister (IDeviceMonitor.DeviceLister lister)
DeviceLister
ayarlanmasına izin verir. Lister'ı ayarlamak için başarılı bir denemeden sonra, uygulamalar sonraki tüm denemeleri iptal edebilir.
parametreler | |
---|---|
lister | IDeviceMonitor.DeviceLister |
Dur
public abstract void stop ()
Monitörün durdurulması gerektiğinde çağrılacak bir yöntem.
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.