ManagedTestDeviceFactory
public class ManagedTestDeviceFactory
extends Object
implements IManagedTestDeviceFactory
java.lang.Objeto | |
↳ | com.android.tradefed.device.ManagedTestDeviceFactory |
Fábrica para crear los diferentes tipos de dispositivos que pueden ser monitoreados por Tf
Resumen
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
|
Constructores públicos | |
---|---|
ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor) |
Métodos públicos | |
---|---|
IManagedTestDevice | createDevice (IDevice idevice) Cree un |
IManagedTestDevice | createRequestedDevice (IDevice idevice, IDeviceSelection options) Cree específicamente un dispositivo que coincida con la especificación |
static boolean | isTcpDeviceSerial (String serial) Ayudante del dispositivo si se trata de una serie de un dispositivo conectado de forma remota. |
void | setFastbootEnabled (boolean enable) Habilite o no el soporte de fastboot para el dispositivo creado. |
Métodos protegidos | |
---|---|
boolean | checkFrameworkSupport (IDevice idevice) Ayudante que devuelve verdadero si el dispositivo tiene soporte de marco. |
CollectingOutputReceiver | createOutputReceiver () Cree un |
IRunUtil | getRunUtil () Devuelve la instancia predeterminada |
boolean | isRemoteEnvironment () Retorna verdadero si actualmente estamos ejecutando en un entorno remoto. |
constantes
MARCO_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)
Campos
CHECK_PM_CMD
protected static final String CHECK_PM_CMD
ESPERADO_ERROR
protected static final String EXPECTED_ERROR
EXPECTED_RES
protected static final String EXPECTED_RES
IPADDRESS_PATRÓN
public static final String IPADDRESS_PATTERN
Monitor de asignación de mA
protected IDeviceMonitor mAllocationMonitor
mDeviceManager
protected IDeviceManager mDeviceManager
mFastboot habilitado
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
crear dispositivo
public IManagedTestDevice createDevice (IDevice idevice)
Cree un IManagedTestDevice
basado en el IDevice
que se le pasó.
Parámetros | |
---|---|
idevice | IDevice : que definirá el tipo de dispositivo creado |
Devoluciones | |
---|---|
IManagedTestDevice | un IManagedTestDevice creado en base al IDevice |
crear dispositivo solicitado
public IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)
Cree específicamente un dispositivo que coincida con la especificación
Parámetros | |
---|---|
idevice | IDevice |
options | IDeviceSelection |
Devoluciones | |
---|---|
IManagedTestDevice |
isTcpDeviceSerial
public static boolean isTcpDeviceSerial (String serial)
Ayudante del dispositivo si se trata de una serie de un dispositivo conectado de forma remota. el formato serial del dispositivo tcp es
Parámetros | |
---|---|
serial | String |
Devoluciones | |
---|---|
boolean |
setFastbootEnabled
public void setFastbootEnabled (boolean enable)
Habilite o no el soporte de fastboot para el dispositivo creado.
Parámetros | |
---|---|
enable | boolean : valor establece el soporte. |
Métodos protegidos
checkFrameworkApoyo
protected boolean checkFrameworkSupport (IDevice idevice)
Ayudante que devuelve verdadero si el dispositivo tiene soporte de marco.
Parámetros | |
---|---|
idevice | IDevice |
Devoluciones | |
---|---|
boolean |
createOutputReceiver
protected CollectingOutputReceiver createOutputReceiver ()
Cree un CollectingOutputReceiver
.
Devoluciones | |
---|---|
CollectingOutputReceiver |
getRunUtil
protected IRunUtil getRunUtil ()
Devuelve la instancia predeterminada IRunUtil
.
Devoluciones | |
---|---|
IRunUtil |
esRemoteEnvironment
protected boolean isRemoteEnvironment ()
Retorna verdadero si actualmente estamos ejecutando en un entorno remoto. Esto alterará el comportamiento del dispositivo.
Devoluciones | |
---|---|
boolean |