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 |
תפסיק
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 2021-10-04 UTC.