ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Factory zur Erstellung der verschiedenen Arten von Geräten, die von Tf überwacht werden können

Zusammenfassung

Konstanten

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

Felder

protected static final String CHECK_PM_CMD

protected static final String EXPECTED_ERROR

protected static final String EXPECTED_RES

public static final String IPADDRESS_PATTERN

public static final String NOTIFY_AS_NATIVE

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Öffentliche Bauträger

ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Öffentliche Methoden

IManagedTestDevice createDevice (IDevice idevice)

Erstellen Sie ein IManagedTestDevice basierend auf dem an es übergebenen IDevice .

IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)

Erstellen Sie gezielt ein Gerät, das der Spezifikation entspricht

static boolean isTcpDeviceSerial (String serial)

Helfer für das Gerät, wenn es sich um eine serielle Verbindung von einem entfernt angeschlossenen Gerät handelt.

void setFastbootEnabled (boolean enable)

Aktivieren oder deaktivieren Sie die Fastboot-Unterstützung für das erstellte Gerät.

Geschützte Methoden

CollectingOutputReceiver createOutputReceiver ()

Erstellen Sie einen CollectingOutputReceiver .

IRunUtil getRunUtil ()

Gibt die Standard IRunUtil Instanz zurück.

boolean isRemoteEnvironment ()

Gibt „true“ zurück, wenn wir derzeit in einer Remote-Umgebung ausgeführt werden.

Konstanten

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Konstanter Wert: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Konstanter Wert: 500 (0x00000000000001f4)

Felder

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

EXPECTED_RES

protected static final String EXPECTED_RES

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Öffentliche Bauträger

ManagedTestDeviceFactory

public ManagedTestDeviceFactory (boolean fastbootEnabled, 
                IDeviceManager deviceManager, 
                IDeviceMonitor allocationMonitor)

Parameter
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Öffentliche Methoden

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Erstellen Sie ein IManagedTestDevice basierend auf dem an es übergebenen IDevice .

Parameter
idevice IDevice : Definiert den Typ des erstellten Geräts

Kehrt zurück
IManagedTestDevice ein IManagedTestDevice, das auf Basis des IDevice erstellt wurde

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Erstellen Sie gezielt ein Gerät, das der Spezifikation entspricht

Parameter
idevice IDevice

options IDeviceSelection

Kehrt zurück
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Helfer für das Gerät, wenn es sich um eine serielle Verbindung von einem entfernt angeschlossenen Gerät handelt. Das serielle Format des TCP-Geräts ist :

Parameter
serial String

Kehrt zurück
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Aktivieren oder deaktivieren Sie die Fastboot-Unterstützung für das erstellte Gerät.

Parameter
enable boolean : Wert legt die Unterstützung fest.

Geschützte Methoden

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Erstellen Sie einen CollectingOutputReceiver .

Kehrt zurück
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Gibt die Standard IRunUtil Instanz zurück.

Kehrt zurück
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Gibt „true“ zurück, wenn wir derzeit in einer Remote-Umgebung ausgeführt werden. Dadurch wird das Geräteverhalten verändert.

Kehrt zurück
boolean