NativeDeviceStateMonitor

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

java.lang.Object
com.android.tradefed.device.NativeDeviceStateMonitor


כיתה עזרה למעקב אחרי המצב של IDevice ללא תמיכה ב-framework.

סיכום

קבועים

long MAX_CHECK_POLL_TIME

int MAX_OP_TIME

משך הזמן המקסימלי של הפעולה, במילישניות, לפקודה 'בדיקה של תגובה'

שדות

protected static final String PERM_DENIED_ERROR_PATTERN

יוצרים ציבוריים

NativeDeviceStateMonitor(IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

שיטות ציבוריות

TestDeviceState getDeviceState()

String getFastbootSerialNumber()

String getMountPoint(String mountName)

String getSerialNumber()

boolean isAdbTcp()

void setDefaultAvailableTimeout(long timeoutMs)

הגדרת הזמן (במילי-שניות) להמתנה עד שהמכשיר יהיה זמין ב-waitForDeviceAvailable().

void setDefaultOnlineTimeout(long timeoutMs)

הגדרת הזמן (במילי-שניות) להמתנה עד שהמכשיר יהיה אונליין ב-waitForDeviceOnline().

void setFastbootSerialNumber(String serial)

מגדירים את המספר הסידורי של מצב האתחול המהיר.

void setIDevice(IDevice newDevice)
void setState(TestDeviceState deviceState)

boolean waitForBootComplete(long waitTime)

IDevice waitForDeviceAvailable(long waitTime)

IDevice waitForDeviceAvailable()

boolean waitForDeviceBootloader(long time)

void waitForDeviceBootloaderStateUpdate()
boolean waitForDeviceFastbootd(String fastbootPath, long time)

IDevice waitForDeviceInRecovery()
boolean waitForDeviceInRecovery(long waitTime)

boolean waitForDeviceInSideload(long waitTime)

boolean waitForDeviceNotAvailable(long waitTime)

IDevice waitForDeviceOnline()

IDevice waitForDeviceOnline(long waitTime)

boolean waitForDeviceShell(long waitTime)

שיטות מוגנות

CollectingOutputReceiver createOutputReceiver()

חשיפה לצורך בדיקה

long getCheckPollTime()

חשיפה לצורך בדיקה

long getCurrentTime()

חשיפה לצורך בדיקה

IDevice getIDevice()
boolean postOnlineCheck(long waitTime)

בדיקות נוספות שצריך לבצע במכשיר שמחובר לאינטרנט

boolean waitForStoreMount(long waitTime)

ממתין לטעינה של החנות החיצונית של המכשיר.

קבועים

MAX_CHECK_POLL_TIME

protected static final long MAX_CHECK_POLL_TIME

ערך קבוע: 30000 (0x0000000000007530)

MAX_OP_TIME

protected static final int MAX_OP_TIME

משך הזמן המקסימלי של הפעולה, במילישניות, לפקודה 'בדיקה של תגובה'

ערך קבוע: 10000 (0x00002710)

שדות

PERM_DENIED_ERROR_PATTERN

protected static final String PERM_DENIED_ERROR_PATTERN

יוצרים ציבוריים

NativeDeviceStateMonitor

public NativeDeviceStateMonitor (IDeviceManager mgr, 
                IDevice device, 
                boolean fastbootEnabled)

פרמטרים
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

שיטות ציבוריות

getDeviceState

public TestDeviceState getDeviceState ()

החזרות
TestDeviceState

getFastbootSerialNumber

public String getFastbootSerialNumber ()

החזרות
String

getMountPoint

public String getMountPoint (String mountName)

פרמטרים
mountName String

החזרות
String

getSerialNumber

public String getSerialNumber ()

החזרות
String

isAdbTcp

public boolean isAdbTcp ()

החזרות
boolean

setDefaultAvailableTimeout

public void setDefaultAvailableTimeout (long timeoutMs)

הגדרת הזמן (במילי-שניות) להמתנה עד שהמכשיר יהיה זמין ב-waitForDeviceAvailable().

פרמטרים
timeoutMs long

setDefaultOnlineTimeout

public void setDefaultOnlineTimeout (long timeoutMs)

הגדרת הזמן (במילי-שניות) להמתנה עד שהמכשיר יהיה אונליין ב-waitForDeviceOnline().

פרמטרים
timeoutMs long

setFastbootSeriesNumber

public void setFastbootSerialNumber (String serial)

הגדרת המספר הסידורי של מצב אתחול מהיר (fastboot).

פרמטרים
serial String

setIDevice

public void setIDevice (IDevice newDevice)

פרמטרים
newDevice IDevice

setState

public void setState (TestDeviceState deviceState)

פרמטרים
deviceState TestDeviceState

pendingForBootcomplete

public boolean waitForBootComplete (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

waitForDeviceAvailable

public IDevice waitForDeviceAvailable (long waitTime)

פרמטרים
waitTime long

החזרות
IDevice

waitForDeviceAvailable

public IDevice waitForDeviceAvailable ()

החזרות
IDevice

waitForDeviceBootloader

public boolean waitForDeviceBootloader (long time)

פרמטרים
time long

החזרות
boolean

waitForDeviceBootloaderStateUpdate

public void waitForDeviceBootloaderStateUpdate ()

waitForDeviceFastbootd

public boolean waitForDeviceFastbootd (String fastbootPath, 
                long time)

פרמטרים
fastbootPath String

time long

החזרות
boolean

waitForDeviceInRecovery

public IDevice waitForDeviceInRecovery ()

החזרות
IDevice

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

startForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

WaitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

waitForDeviceOnline

public IDevice waitForDeviceOnline ()

החזרות
IDevice

waitForDeviceOnline

public IDevice waitForDeviceOnline (long waitTime)

פרמטרים
waitTime long

החזרות
IDevice

startForDeviceShell

public boolean waitForDeviceShell (long waitTime)

פרמטרים
waitTime long

החזרות
boolean

שיטות מוגנות

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

חשיפה לצורך בדיקה

החזרות
CollectingOutputReceiver CollectingOutputReceiver

getCheckPollTime

protected long getCheckPollTime ()

חשיפה לצורך בדיקה

החזרות
long

getCurrentTime

protected long getCurrentTime ()

חשיפה לבדיקה

החזרות
long

getIDevice

protected IDevice getIDevice ()

החזרות
IDevice האפליקציה IDevice משויכת למעקב אחר מצב

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

בדיקות נוספות שצריך לבצע במכשיר שמחובר לאינטרנט

פרמטרים
waitTime long: משך הזמן (באלפיות שנייה) להמתנה לפני הפסקה

החזרות
boolean true אם הבדיקות מסתיימות בהצלחה לפני שתוקף הזמן waitTime פג. אחרת false

startForStoreMount

protected boolean waitForStoreMount (long waitTime)

המתנה לטעינה של האחסון החיצוני של המכשיר.

פרמטרים
waitTime long: משך הזמן (באלפיות שנייה) להמתנה לפני הפסקה

החזרות
boolean true אם החנות החיצונית מותקנת לפני שהתוקף של זמן ההמתנה יפוג. אחרת false