ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Fabryka do tworzenia różnych rodzajów urządzeń, które mogą być monitorowane przez Tf

Podsumowanie

Stałe

String IPADDRESS_PATTERN

String NOTIFY_AS_NATIVE

Pola

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Konstruktory publiczne

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Metody publiczne

IManagedTestDevice createDevice(IDevice idevice)

Tworzy IManagedTestDevice na podstawie przekazanego do niej IDevice.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Tworzy urządzenie zgodne ze specyfikacją

static boolean isTcpDeviceSerial(String serial)

Pomocnik do sprawdzania, czy numer seryjny pochodzi z połączonego urządzenia zdalnego.

void setFastbootEnabled(boolean enable)

Włącza lub wyłącza obsługę fastboot dla utworzonego urządzenia.

Metody chronione

CollectingOutputReceiver createOutputReceiver()

Tworzy CollectingOutputReceiver.

IRunUtil getRunUtil()

Zwraca domyślną instancję IRunUtil.

boolean isRemoteEnvironment()

Zwraca wartość true, jeśli obecnie działamy w środowisku zdalnym.

Stałe

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"

Pola

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Konstruktory publiczne

ManagedTestDeviceFactory

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

Parametry
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Metody publiczne

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Tworzy IManagedTestDevice na podstawie przekazanego do niej IDevice.

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

Zwraca
IManagedTestDevice IManagedTestDevice utworzony na podstawie IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Tworzy urządzenie zgodne ze specyfikacją

Parametry
idevice IDevice

options IDeviceSelection

Zwraca
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Pomocnik do sprawdzania, czy numer seryjny pochodzi z urządzenia połączonego zdalnie. Format numeru seryjnego urządzenia TCP to :

Parametry
serial String

Zwraca
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Włącza lub wyłącza obsługę fastboot dla utworzonego urządzenia.

Parametry
enable boolean: wartość ustawiająca obsługę.

Metody chronione

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Tworzy CollectingOutputReceiver.

Zwraca
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Zwraca domyślną instancję IRunUtil.

Zwraca
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Zwraca wartość true, jeśli obecnie działamy w środowisku zdalnym. Spowoduje to zmianę zachowania urządzenia.

Zwraca
boolean