ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Fabryka tworząca różne rodzaje urządzeń, które mogą być monitorowane przez Tf

Podsumowanie

Stałe

String CHECK_PM_CMD

String EXPECTED_ERROR

String EXPECTED_RES

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

String IPADDRESS_PATTERN

String NOTIFY_AS_NATIVE

Fieldsem

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Publiczne konstruktory

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Metody publiczne

IManagedTestDevice createDevice(IDevice idevice)

Utwórz IManagedTestDevice na podstawie IDevice przekazanego do niego.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

utworzyć urządzenie spełniające specyfikację,

static boolean isTcpDeviceSerial(String serial)

Pomocnik urządzenia, jeśli jest to numer seryjny zdalnie połączonego urządzenia.

void setFastbootEnabled(boolean enable)

Włącz lub wyłącz obsługę fastboot na utworzonym urządzeniu.

Metody chronione

CollectingOutputReceiver createOutputReceiver()

Utwórz CollectingOutputReceiver.

IRunUtil getRunUtil()

Zwraca domyślną instancję IRunUtil.

boolean isRemoteEnvironment()

Zwraca wartość „prawda”, jeśli obecnie działamy w środowisku zdalnym.

Stałe

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

Constant Value: "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

Stała wartość: „No such file or directory”

EXPECTED_RES

protected static final String EXPECTED_RES

Stała wartość: „/system/bin/pm”

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Constant Value: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Wartość stała: 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

Wartość stała: "((^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]))|(localhost)){1}"

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

Wartość stała: „NOTIFY_AS_NATIVE”

Fieldsem

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Publiczne konstruktory

ManagedTestDeviceFactory

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

Parametry
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Metody publiczne

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Utwórz IManagedTestDevice na podstawie IDevice przekazanego do niego.

Parametry
idevice IDevice: określa typ tworzonego urządzenia.

Zwroty
IManagedTestDevice obiekt IManagedTestDevice utworzony na podstawie obiektu IDevice,

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

utworzyć urządzenie spełniające specyfikację,

Parametry
idevice IDevice

options IDeviceSelection

Zwroty
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Pomocnik urządzenia, jeśli jest to numer seryjny urządzenia połączonego zdalnie. Format numeru seryjnego urządzenia TCP to :

Parametry
serial String

Zwroty
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Włącz lub wyłącz obsługę fastboot na utworzonym urządzeniu.

Parametry
enable boolean: wartość ustawiona na obsługę.

Metody chronione

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Utwórz CollectingOutputReceiver.

Zwroty
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Zwraca domyślną instancję IRunUtil.

Zwroty
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Zwraca wartość „prawda”, jeśli obecnie działamy w środowisku zdalnym. Spowoduje to zmianę działania urządzenia.

Zwroty
boolean