ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Fábrica para criar diferentes tipos de dispositivos que podem ser monitorados pelo TF

Resumo

Constantes

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

Campos

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

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Construtores públicos

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Métodos públicos

IManagedTestDevice createDevice(IDevice idevice)

void setFastbootEnabled(boolean enable)

Métodos protegidos

boolean checkFrameworkSupport(IDevice idevice)

Auxiliar que retorna "true" se o dispositivo tiver suporte de framework.

CollectingOutputReceiver createOutputReceiver()

Crie um CollectingOutputReceiver.

IRunUtil getRunUtil()

Retorne a instância IRunUtil padrão.

boolean isRemoteEnvironment()

Retorna true se estivermos executando em um ambiente remoto no momento.

boolean isTcpDeviceSerial(String serial)

Ajuda para o dispositivo se ele for um número em série de um dispositivo conectado remotamente.

Constantes

STRUCTWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Valor constante: 3 (0x00000003)

STRUCTWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Valor constante: 500 (0x00000000000001f4)

Campos

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

EXPECTED_RES

protected static final String EXPECTED_RES

ENDEREÇO_IP_PATTERN

public static final String IPADDRESS_PATTERN

Monitor de alocação

protected IDeviceMonitor mAllocationMonitor

Gerenciador de dispositivos para dispositivos móveis

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Construtores 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)

Parâmetros
idevice IDevice

Retorna
IManagedTestDevice

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Parâmetros
enable boolean

Métodos protegidos

checkFrameworkSupport

protected boolean checkFrameworkSupport (IDevice idevice)

Auxiliar que retorna "true" se o dispositivo tiver suporte de framework.

Parâmetros
idevice IDevice

Retorna
boolean

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Crie um CollectingOutputReceiver.

Retorna
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Retorne a instância IRunUtil padrão.

Retorna
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Retorna true se estivermos executando em um ambiente remoto no momento. Isso vai mudar o dispositivo do seu modelo.

Retorna
boolean

isTcpDeviceSerial

protected boolean isTcpDeviceSerial (String serial)

Ajuda para o dispositivo se ele for um número em série de um dispositivo conectado remotamente. formato serial do dispositivo TCP é :

Parâmetros
serial String

Retorna
boolean