ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Usine permettant de créer les différents types d'appareils pouvant être surveillés par Tf

Résumé

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

Champs

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

Constructeurs publics

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Méthodes publiques

IManagedTestDevice createDevice(IDevice idevice)

Créez un IManagedTestDevice basé sur le IDevice qui lui est transmis.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Créer spécifiquement un appareil correspondant à la spécification

static boolean isTcpDeviceSerial(String serial)

Assistant pour l'appareil s'il s'agit d'un numéro de série provenant d'un appareil connecté à distance.

void setFastbootEnabled(boolean enable)

Activez ou non la prise en charge de fastboot pour l'appareil créé.

Méthodes protégées

CollectingOutputReceiver createOutputReceiver()

Créez un élément CollectingOutputReceiver.

IRunUtil getRunUtil()

Renvoie l'instance IRunUtil par défaut.

boolean isRemoteEnvironment()

Renvoie la valeur "true" si nous sommes actuellement en cours d'exécution dans un environnement distant.

Constantes

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

Valeur constante : "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

Valeur constante : "No such file or directory"

EXPECTED_RES

protected static final String EXPECTED_RES

Valeur constante : "/system/bin/pm"

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Valeur constante : 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Valeur constante : 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

Valeur de 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

Valeur de constante : "NOTIFY_AS_NATIVE"

Champs

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

Constructeurs publics

ManagedTestDeviceFactory

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

Paramètres
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Méthodes publiques

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Créez un IManagedTestDevice basé sur le IDevice qui lui est transmis.

Paramètres
idevice IDevice : définit le type d'appareil créé.

Renvoie
IManagedTestDevice un IManagedTestDevice créé à partir de l'IDevice.

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Créer spécifiquement un appareil correspondant à la spécification

Paramètres
idevice IDevice

options IDeviceSelection

Renvoie
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Assistant pour l'appareil s'il s'agit d'un numéro de série provenant d'un appareil connecté à distance. Le format du numéro de série de l'appareil tcp est :

Paramètres
serial String

Renvoie
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Activez ou non la prise en charge de fastboot pour l'appareil créé.

Paramètres
enable boolean : valeur définie pour l'assistance.

Méthodes protégées

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Créez un élément CollectingOutputReceiver.

Renvoie
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Renvoie l'instance IRunUtil par défaut.

Renvoie
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Renvoie la valeur "true" si nous sommes actuellement en cours d'exécution dans un environnement distant. Cela modifiera le comportement de l'appareil.

Renvoie
boolean