ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

java.lang.Oggetto
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)

Creare un IManagedTestDevice basato IDevice passato.

IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)

Crea in modo specifico un dispositivo che corrisponda alla specifica

static boolean isTcpDeviceSerial (String serial)

Helper 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 ()

Crea un CollectingOutputReceiver .

IRunUtil getRunUtil ()

Restituisce l'istanza IRunUtil predefinita.

boolean isRemoteEnvironment ()

Restituisci true se attualmente stiamo 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

PREVISTO_ERRORE

protected static final String EXPECTED_ERROR

PREVISTO_RES

protected static final String EXPECTED_RES

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

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)

Creare un IManagedTestDevice basato IDevice passato.

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

ritorna
IManagedTestDevice un IManagedTestDevice creato in base all'IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Crea in modo specifico un dispositivo che corrisponda alla specifica

Parametri
idevice IDevice

options IDeviceSelection

ritorna
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Helper 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

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Crea un CollectingOutputReceiver .

ritorna
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Restituisce l'istanza IRunUtil predefinita.

ritorna
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Restituisci true se attualmente stiamo eseguendo in un ambiente remoto. Ciò altererà il comportamento del dispositivo.

ritorna
boolean