ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Factory per creare i diversi tipi di dispositivi che possono essere monitorati da Tf

Riepilogo

Costanti

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

Campi

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Costruttori pubblici

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Metodi pubblici

IManagedTestDevice createDevice(IDevice idevice)

Crea un IManagedTestDevice in base al IDevice passato.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Crea specificamente un dispositivo che corrisponda alla specifica

static boolean isTcpDeviceSerial(String serial)

Helper to device se si tratta di un numero di serie di un dispositivo connesso da remoto.

void setFastbootEnabled(boolean enable)

Attiva o meno il supporto di fastboot per il dispositivo creato.

Metodi protetti

CollectingOutputReceiver createOutputReceiver()

Crea un CollectingOutputReceiver.

IRunUtil getRunUtil()

Restituisce l'istanza IRunUtil predefinita.

boolean isRemoteEnvironment()

Restituisce true se l'app è attualmente in esecuzione in un ambiente remoto.

Costanti

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

Valore costante: "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

Constant Value: "No such file or directory"

EXPECTED_RES

protected static final String EXPECTED_RES

Constant Value: "/system/bin/pm"

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Valore costante: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Valore costante: 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

Valore costante: "((^([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

Constant Value: "NOTIFY_AS_NATIVE"

Campi

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Costruttori pubblici

ManagedTestDeviceFactory

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

Parametri
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Metodi pubblici

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Crea un IManagedTestDevice in base al IDevice passato.

Parametri
idevice IDevice: che definirà il tipo di dispositivo creato

Ritorni
IManagedTestDevice un IManagedTestDevice creato in base a IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Crea specificamente un dispositivo che corrisponda alla specifica

Parametri
idevice IDevice

options IDeviceSelection

Ritorni
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Helper to device if it's a serial from a remotely connected device. serial format of tcp device is :

Parametri
serial String

Ritorni
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Attiva o meno il supporto di fastboot per il dispositivo creato.

Parametri
enable boolean: valore impostato per il supporto.

Metodi protetti

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Crea un CollectingOutputReceiver.

Ritorni
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Restituisci l'istanza IRunUtil predefinita.

Ritorni
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Restituisce true se l'app è attualmente in esecuzione in un ambiente remoto. Questa operazione modificherà il comportamento del dispositivo.

Ritorni
boolean