Appareil Android distant

public class RemoteAndroidDevice
extends TestDevice

java.lang.Object
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.RemoteAndroidDevice


Implémentation d'un ITestDevice pour un appareil Android full stack connecté via adb connect. Supposons que le numéro de série de l'appareil soit au format : dans adb.

Résumé

Constantes

long DEFAULT_SHORT_CMD_TIMEOUT

int MAX_RETRIES

long RETRY_INTERVAL_MS

long WAIT_FOR_ADB_CONNECT

Constructeurs publics

RemoteAndroidDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Crée un RemoteAndroidDevice .

Méthodes publiques

static boolean checkSerialFormatValid (String serialString)

Vérifiez si le format de la série est comme prévu :port

DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

Renvoyez un DeviceDescriptor à partir des informations sur le périphérique pour obtenir des informations sur celui-ci sans transmettre l'objet périphérique réel.

String getFastbootSerialNumber ()

Renvoie le numéro de série du mode fastboot.

String getMacAddress ()

Renvoie l'adresse MAC de l'appareil, nulle s'il ne parvient pas à interroger l'appareil.

boolean isEncryptionSupported ()

Renvoie si le chiffrement est pris en charge sur l'appareil.

Constantes

DEFAULT_SHORT_CMD_TIMEOUT

protected static final long DEFAULT_SHORT_CMD_TIMEOUT

Valeur constante : 20 000 (0x0000000000004e20)

MAX_RETRIES

protected static final int MAX_RETRIES

Valeur constante : 5 (0x00000005)

RETRY_INTERVAL_MS

protected static final long RETRY_INTERVAL_MS

Valeur constante : 5 000 (0x0000000000001388)

WAIT_FOR_ADB_CONNECT

public static final long WAIT_FOR_ADB_CONNECT

Valeur constante : 120 000 (0x000000000001d4c0)

Constructeurs publics

Appareil Android distant

public RemoteAndroidDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

Crée un RemoteAndroidDevice .

Paramètres
device IDevice : l' IDevice associé

stateMonitor IDeviceStateMonitor : le mécanisme IDeviceStateMonitor à utiliser

allocationMonitor IDeviceMonitor : le IDeviceMonitor pour informer des changements d'état d'allocation.

Méthodes publiques

checkSerialFormatValid

public static boolean checkSerialFormatValid (String serialString)

Vérifiez si le format de la série est comme prévu :port

Paramètres
serialString String

Retour
boolean vrai si le format est valide, faux sinon.

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

Renvoyez un DeviceDescriptor à partir des informations sur le périphérique pour obtenir des informations sur celui-ci sans transmettre l'objet périphérique réel.

Paramètres
shortDescriptor boolean : s'il faut ou non limiter le descripteur au strict minimum d'informations

Retour
DeviceDescriptor

getFastbootSerialNumber

public String getFastbootSerialNumber ()

Renvoie le numéro de série du mode fastboot.

Retour
String

getMacAddress

public String getMacAddress ()

Renvoie l'adresse MAC de l'appareil, nulle s'il ne parvient pas à interroger l'appareil.

Retour
String

isEncryptionSupported

public boolean isEncryptionSupported ()

Renvoie si le chiffrement est pris en charge sur l'appareil.

Retour
boolean true si l'appareil prend en charge le cryptage.