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 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 all'IDevice passato.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Crea in modo specifico un dispositivo che corrisponda alle specifiche

static boolean isTcpDeviceSerial(String serial)

Utilità per verificare se si tratta di un numero di serie di un dispositivo connesso da remoto.

void setFastbootEnabled(boolean enable)

Attiva o disattiva 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 attualmente è in esecuzione in un ambiente remoto.

Costanti

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

Valore costante: "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 all'IDevice passato.

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

Resi
IManagedTestDevice Un IManagedTestDevice creato in base all'IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Crea in modo specifico un dispositivo che corrisponda alle specifiche

Parametri
idevice IDevice

options IDeviceSelection

Resi
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Utilità per verificare se si tratta di un numero di serie di un dispositivo connesso da remoto. Il formato del numero di serie del dispositivo TCP è :

Parametri
serial String

Resi
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

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

Parametri
enable boolean: valore che imposta il supporto.

Metodi protetti

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Crea un CollectingOutputReceiver.

Resi
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Restituisce l'istanza IRunUtil predefinita.

Resi
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Restituisce true se attualmente è in esecuzione in un ambiente remoto. Questo modificherà il comportamento del dispositivo.

Resi
boolean