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

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

Campi

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

Costruttori pubblici

ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Metodi pubblici

IManagedTestDevice createDevice (IDevice idevice)

Crea un IManagedTestDevice in base IDevice passatogli.

IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)

Creare specificatamente un dispositivo che corrisponda alle specifiche

static boolean isTcpDeviceSerial (String serial)

Assistente al dispositivo se si tratta di un seriale da un dispositivo connesso in remoto.

void setFastbootEnabled (boolean enable)

Abilita o meno il supporto fastboot per il dispositivo creato.

Metodi protetti

CollectingOutputReceiver createOutputReceiver ()

Creare un CollectingOutputReceiver .

IRunUtil getRunUtil ()

Restituisce l'istanza IRunUtil predefinita.

boolean isRemoteEnvironment ()

Restituisce vero se stiamo attualmente eseguendo in un ambiente remoto.

Costanti

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)

Campi

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

ERRORE_ATTENUTO

protected static final String EXPECTED_ERROR

ASPETTATO_RES

protected static final String EXPECTED_RES

INDIRIZZO IP_MODELLO

public static final String IPADDRESS_PATTERN

NOTIFICA_AS_NATIVO

public static final String NOTIFY_AS_NATIVE

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootAbilitato

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 IDevice passatogli.

Parametri
idevice IDevice : definirà il tipo di dispositivo creato

ritorna
IManagedTestDevice un IManagedTestDevice creato in base all'IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Creare specificatamente un dispositivo che corrisponda alle specifiche

Parametri
idevice IDevice

options IDeviceSelection

ritorna
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Assistente al dispositivo se si tratta di un seriale da un dispositivo connesso in remoto. il formato seriale del dispositivo TCP è :

Parametri
serial String

ritorna
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Abilita o meno il supporto fastboot per il dispositivo creato.

Parametri
enable boolean : valore imposta il supporto.

Metodi protetti

creareOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Creare un CollectingOutputReceiver .

ritorna
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Restituisce l'istanza IRunUtil predefinita.

ritorna
IRunUtil

èRemoteEnvironment

protected boolean isRemoteEnvironment ()

Restituisce vero se stiamo attualmente eseguendo in un ambiente remoto. Ciò modificherà il comportamento del dispositivo.

ritorna
boolean