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 () שיטה שתיקרא כאשר יהיה צורך לעצור את המוניטור. |
שיטות ציבוריות
הודע ל-DeviceStateChange
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 |
תפסיק
public abstract void stop ()
שיטה שתיקרא כאשר יהיה צורך לעצור את המוניטור.
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.