NativeDeviceStateMonitor

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

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


Hilfsklasse zum Überwachen des Status eines IDevice ohne Framework-Unterstützung.

Zusammenfassung

Konstanten

long MAX_CHECK_POLL_TIME

int MAX_OP_TIME

die maximale Betriebszeit in ms für einen Befehl „Umfrage zur Reaktionsfähigkeit“.

Felder

protected static final String PERM_DENIED_ERROR_PATTERN

Öffentliche Bauträger

NativeDeviceStateMonitor ( IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

Öffentliche Methoden

TestDeviceState getDeviceState ()

String getFastbootSerialNumber ()

String getMountPoint (String mountName)

String getSerialNumber ()

boolean isAdbTcp ()

void setDefaultAvailableTimeout (long timeoutMs)

Legen Sie in waitForDeviceAvailable() die Zeit in ms fest, die auf die Verfügbarkeit eines Geräts gewartet werden soll.

void setDefaultOnlineTimeout (long timeoutMs)

Legen Sie in waitForDeviceOnline() die Zeit in ms fest, die darauf gewartet werden soll, dass ein Gerät online ist.

void setFastbootSerialNumber (String serial)

Legen Sie die Seriennummer des Fastboot-Modus fest.

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)

Geschützte Methoden

CollectingOutputReceiver createOutputReceiver ()

Zum Testen ausgesetzt

long getCheckPollTime ()

Zum Testen ausgesetzt

long getCurrentTime ()

Zum Testen ausgesetzt

IDevice getIDevice ()
boolean postOnlineCheck (long waitTime)

Zusätzliche Prüfungen, die auf einem Online-Gerät durchgeführt werden müssen

boolean waitForStoreMount (long waitTime)

Wartet darauf, dass der externe Speicher des Geräts bereitgestellt wird.

Konstanten

MAX_CHECK_POLL_TIME

protected static final long MAX_CHECK_POLL_TIME

Konstanter Wert: 30000 (0x0000000000007530)

MAX_OP_TIME

protected static final int MAX_OP_TIME

die maximale Betriebszeit in ms für einen Befehl „Umfrage zur Reaktionsfähigkeit“.

Konstanter Wert: 10000 (0x00002710)

Felder

PERM_DENIED_ERROR_PATTERN

protected static final String PERM_DENIED_ERROR_PATTERN

Öffentliche Bauträger

NativeDeviceStateMonitor

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

Parameter
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

Öffentliche Methoden

getDeviceState

public TestDeviceState getDeviceState ()

Kehrt zurück
TestDeviceState

getFastbootSerialNumber

public String getFastbootSerialNumber ()

Kehrt zurück
String

getMountPoint

public String getMountPoint (String mountName)

Parameter
mountName String

Kehrt zurück
String

getSerialNumber

public String getSerialNumber ()

Kehrt zurück
String

isAdbTcp

public boolean isAdbTcp ()

Kehrt zurück
boolean

setDefaultAvailableTimeout

public void setDefaultAvailableTimeout (long timeoutMs)

Legen Sie in waitForDeviceAvailable() die Zeit in ms fest, die auf die Verfügbarkeit eines Geräts gewartet werden soll.

Parameter
timeoutMs long

setDefaultOnlineTimeout

public void setDefaultOnlineTimeout (long timeoutMs)

Legen Sie in waitForDeviceOnline() die Zeit in ms fest, die darauf gewartet werden soll, dass ein Gerät online ist.

Parameter
timeoutMs long

setFastbootSerialNumber

public void setFastbootSerialNumber (String serial)

Legen Sie die Seriennummer des Fastboot-Modus fest.

Parameter
serial String

setIDevice

public void setIDevice (IDevice newDevice)

Parameter
newDevice IDevice

setState

public void setState (TestDeviceState deviceState)

Parameter
deviceState TestDeviceState

waitForBootComplete

public boolean waitForBootComplete (long waitTime)

Parameter
waitTime long

Kehrt zurück
boolean

waitForDeviceAvailable

public IDevice waitForDeviceAvailable (long waitTime)

Parameter
waitTime long

Kehrt zurück
IDevice

waitForDeviceAvailable

public IDevice waitForDeviceAvailable ()

Kehrt zurück
IDevice

waitForDeviceBootloader

public boolean waitForDeviceBootloader (long time)

Parameter
time long

Kehrt zurück
boolean

waitForDeviceBootloaderStateUpdate

public void waitForDeviceBootloaderStateUpdate ()

waitForDeviceFastbootd

public boolean waitForDeviceFastbootd (String fastbootPath, 
                long time)

Parameter
fastbootPath String

time long

Kehrt zurück
boolean

waitForDeviceInRecovery

public IDevice waitForDeviceInRecovery ()

Kehrt zurück
IDevice

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

Parameter
waitTime long

Kehrt zurück
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

Parameter
waitTime long

Kehrt zurück
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

Parameter
waitTime long

Kehrt zurück
boolean

waitForDeviceOnline

public IDevice waitForDeviceOnline ()

Kehrt zurück
IDevice

waitForDeviceOnline

public IDevice waitForDeviceOnline (long waitTime)

Parameter
waitTime long

Kehrt zurück
IDevice

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

Parameter
waitTime long

Kehrt zurück
boolean

Geschützte Methoden

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Zum Testen ausgesetzt

Kehrt zurück
CollectingOutputReceiver CollectingOutputReceiver

getCheckPollTime

protected long getCheckPollTime ()

Zum Testen ausgesetzt

Kehrt zurück
long

getCurrentTime

protected long getCurrentTime ()

Zum Testen ausgesetzt

Kehrt zurück
long

getIDevice

protected IDevice getIDevice ()

Kehrt zurück
IDevice IDevice Zuordnung zum Statusmonitor

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

Zusätzliche Prüfungen, die auf einem Online-Gerät durchgeführt werden müssen

Parameter
waitTime long : Wartezeit in ms, bevor aufgegeben wird

Kehrt zurück
boolean true , wenn die Prüfungen vor Ablauf von waitTime erfolgreich sind. sonst false

waitForStoreMount

protected boolean waitForStoreMount (long waitTime)

Wartet darauf, dass der externe Speicher des Geräts bereitgestellt wird.

Parameter
waitTime long : Wartezeit in ms, bevor aufgegeben wird

Kehrt zurück
boolean true , wenn der externe Speicher vor Ablauf von waitTime gemountet wird. sonst false