ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Es la fábrica para crear los diferentes tipos de dispositivos que Tf puede supervisar.

Resumen

Constantes

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

Campos

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Constructores públicos

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Métodos públicos

IManagedTestDevice createDevice(IDevice idevice)

Crea un IManagedTestDevice basado en el IDevice que se le pasó.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Crear específicamente un dispositivo que coincida con la especificación

static boolean isTcpDeviceSerial(String serial)

Es un asistente para el dispositivo si se trata de un número de serie de un dispositivo conectado de forma remota.

void setFastbootEnabled(boolean enable)

Habilita o inhabilita la compatibilidad con fastboot para el dispositivo creado.

Métodos protegidos

CollectingOutputReceiver createOutputReceiver()

Crea un CollectingOutputReceiver.

IRunUtil getRunUtil()

Devuelve la instancia predeterminada de IRunUtil.

boolean isRemoteEnvironment()

Devuelve verdadero si actualmente se ejecuta en un entorno remoto.

Constantes

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

Valor de la constante: "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

Valor de la constante: "No such file or directory"

EXPECTED_RES

protected static final String EXPECTED_RES

Valor de la constante: "/system/bin/pm"

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Valor constante: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Valor constante: 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

Valor constante: "((^([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

Valor de la constante: "NOTIFY_AS_NATIVE"

Campos

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Constructores públicos

ManagedTestDeviceFactory

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

Parámetros
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Métodos públicos

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Crea un IManagedTestDevice basado en el IDevice que se le pasó.

Parámetros
idevice IDevice: Definirá el tipo de dispositivo creado.

Muestra
IManagedTestDevice Un IManagedTestDevice creado en función del IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Crear específicamente un dispositivo que coincida con la especificación

Parámetros
idevice IDevice

options IDeviceSelection

Muestra
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Es un auxiliar para el dispositivo si se trata de un número de serie de un dispositivo conectado de forma remota. El formato de número de serie del dispositivo TCP es :

Parámetros
serial String

Muestra
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Habilita o inhabilita la compatibilidad con fastboot para el dispositivo creado.

Parámetros
enable boolean: Es el conjunto de valores que admite.

Métodos protegidos

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Crea un CollectingOutputReceiver.

Muestra
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Devuelve la instancia predeterminada de IRunUtil.

Muestra
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Devuelve verdadero si actualmente se ejecuta en un entorno remoto. Esto alterará el comportamiento del dispositivo.

Muestra
boolean