StubDevice

public class StubDevice
extends Object implements IDevice

java.lang.Objeto
com.android.tradefed.device.StubDevice


Implementación de marcador de posición de código auxiliar de un IDevice .

Resumen

Constructores públicos

StubDevice (String serial)
StubDevice (String serial, boolean isEmulator)

Métodos públicos

boolean arePropertiesSet ()

void createForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)

void createForward (int localPort, int remotePort)

void createReverse (int remotePort, int localPort)

void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)

void executeShellCommand (String command, IShellOutputReceiver receiver)

void executeShellCommand (String command, IShellOutputReceiver receiver, int maxTimeToOutputResponse)

Este método está en desuso. use executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit) .

void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)

getAbis ()

String getAvdName ()

String getAvdPath ()

getBattery (long freshnessTime, TimeUnit timeUnit)

getBattery ()

Integer getBatteryLevel (long freshnessMs)

Este método está en desuso. use getBattery(long, TimeUnit) en su lugar.

Integer getBatteryLevel ()

Este método está en desuso. use getBattery() en su lugar.

Client getClient (String applicationName)

String getClientName (int pid)

Client[] getClients ()

int getDensity ()

FileListingService getFileListingService ()

String getLanguage ()

String getMountPoint (String name)

String getName ()

getProperties ()

Este método está en desuso. utilice getSystemProperty(String) en su lugar.

String getProperty (String name)

String getPropertyCacheOrSync (String name)

Este método está en desuso. use getProperty(String) en su lugar.

int getPropertyCount ()

Este método está en desuso. en desuso en ddmlib con "detalle de implementación" como motivo.

String getPropertySync (String name)

Este método está en desuso. use getProperty(String) en su lugar.

String getRegion ()

RawImage getScreenshot ()

RawImage getScreenshot (long timeout, TimeUnit unit)
String getSerialNumber ()

IDevice.DeviceState getState ()

SyncService getSyncService ()

ListenableFuture<String> getSystemProperty (String name)

AndroidVersion getVersion ()

boolean hasClients ()

void installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs)

void installPackage (String packageFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs)

void installPackage (String packageFilePath, boolean reinstall, String... extraArgs)

void installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit) installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit) installPackages ( apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit)

void installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, String... extraArgs)

void installRemotePackage (String remoteFilePath, boolean reinstall, String... extraArgs)

void installRemotePackage (String remoteFilePath, boolean reinstall, InstallReceiver receiver, long maxTimeout, long maxTimeToOutputResponse, TimeUnit maxTimeUnits, String... extraArgs)

boolean isBootLoader ()

boolean isEmulator ()

boolean isOffline ()

boolean isOnline ()

boolean isRoot ()

void pullFile (String remote, String local)

void pushFile (String local, String remote)

void reboot (String into)

void removeForward (int localPort)

void removeForward (int localPort, int remotePort)

void removeForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)

void removeRemotePackage (String remoteFilePath)

void removeReverse (int remotePort)

boolean root ()

void runEventLogService (LogReceiver receiver)

void runLogService (String logname, LogReceiver receiver)

void setSerial (String serial)
void startScreenRecorder (String remoteFilePath, ScreenRecorderOptions options, IShellOutputReceiver receiver)

boolean supportsFeature (IDevice.HardwareFeature arg0)
boolean supportsFeature (IDevice.Feature feature)

String syncPackageToDevice (String localFilePath)

String uninstallApp (String applicationID, String... extraArgs)

String uninstallPackage (String packageName)

Constructores públicos

StubDevice

public StubDevice (String serial)

Parámetros
serial String

StubDevice

public StubDevice (String serial, 
                boolean isEmulator)

Parámetros
serial String

isEmulator boolean

Métodos públicos

conjunto de propiedades

public boolean arePropertiesSet ()

Devoluciones
boolean

crearAdelante

public void createForward (int localPort, 
                String remoteSocketName, 
                IDevice.DeviceUnixSocketNamespace namespace)

Parámetros
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

Lanza
AdbCommandRejectedException
TimeoutException

crearAdelante

public void createForward (int localPort, 
                int remotePort)

Parámetros
localPort int

remotePort int

Lanza
AdbCommandRejectedException
TimeoutException

crearReverse

public void createReverse (int remotePort, 
                int localPort)

Parámetros
remotePort int

localPort int

Lanza
AdbCommandRejectedException
TimeoutException

ejecutarShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits)

Parámetros
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

ejecutarShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

Parámetros
command String

receiver IShellOutputReceiver

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

ejecutarShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                int maxTimeToOutputResponse)

Este método está en desuso.
use executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit) .

Parámetros
command String

receiver IShellOutputReceiver

maxTimeToOutputResponse int

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

ejecutarShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeout, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits)

Parámetros
command String

receiver IShellOutputReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

obtenerAbis

public  getAbis ()

Devoluciones

getAvdName

public String getAvdName ()

Devoluciones
String

getAvdPath

public String getAvdPath ()

Devoluciones
String

obtenerBatería

public  getBattery (long freshnessTime, 
                TimeUnit timeUnit)

Parámetros
freshnessTime long

timeUnit TimeUnit

Devoluciones

obtenerBatería

public  getBattery ()

Devoluciones

getBatteryLevel

public Integer getBatteryLevel (long freshnessMs)

Este método está en desuso.
use getBattery(long, TimeUnit) en su lugar.

Parámetros
freshnessMs long

Devoluciones
Integer

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getBatteryLevel

public Integer getBatteryLevel ()

Este método está en desuso.
use getBattery() en su lugar.

Devoluciones
Integer

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

obtenerCliente

public Client getClient (String applicationName)

Parámetros
applicationName String

Devoluciones
Client

getClientName

public String getClientName (int pid)

Parámetros
pid int

Devoluciones
String

obtenerclientes

public Client[] getClients ()

Devoluciones
Client[]

obtenerDensidad

public int getDensity ()

Devoluciones
int

getFileListingService

public FileListingService getFileListingService ()

Devoluciones
FileListingService

obtenerIdioma

public String getLanguage ()

Devoluciones
String

obtenerPuntoMontaje

public String getMountPoint (String name)

Parámetros
name String

Devoluciones
String

obtenerNombre

public String getName ()

Devoluciones
String

obtener propiedades

public  getProperties ()

Este método está en desuso.
utilice getSystemProperty(String) en su lugar.

Devoluciones

obtenerPropiedad

public String getProperty (String name)

Parámetros
name String

Devoluciones
String

getPropertyCacheOrSync

public String getPropertyCacheOrSync (String name)

Este método está en desuso.
use getProperty(String) en su lugar.

Parámetros
name String

Devoluciones
String

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getPropertyCount

public int getPropertyCount ()

Este método está en desuso.
en desuso en ddmlib con "detalle de implementación" como motivo.

Devoluciones
int

obtenerPropertySync

public String getPropertySync (String name)

Este método está en desuso.
use getProperty(String) en su lugar.

Parámetros
name String

Devoluciones
String

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

getRegion

public String getRegion ()

Devoluciones
String

obtener captura de pantalla

public RawImage getScreenshot ()

Devoluciones
RawImage

Lanza
AdbCommandRejectedException
TimeoutException

obtener captura de pantalla

public RawImage getScreenshot (long timeout, 
                TimeUnit unit)

Parámetros
timeout long

unit TimeUnit

Devoluciones
RawImage

Lanza
AdbCommandRejectedException
TimeoutException

getSerialNumber

public String getSerialNumber ()

Devoluciones
String

obtenerEstado

public IDevice.DeviceState getState ()

Devoluciones
IDevice.DeviceState

getSyncService

public SyncService getSyncService ()

Devoluciones
SyncService

Lanza
AdbCommandRejectedException
TimeoutException

getSystemProperty

public ListenableFuture<String> getSystemProperty (String name)

Parámetros
name String

Devoluciones
ListenableFuture<String>

getVersion

public AndroidVersion getVersion ()

Devoluciones
AndroidVersion

tieneClientes

public boolean hasClients ()

Devoluciones
boolean

paquete de instalación

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                long maxTimeout, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits, 
                String... extraArgs)

Parámetros
packageFilePath String

reinstall boolean

receiver InstallReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

extraArgs String

Lanza
InstallException

paquete de instalación

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                String... extraArgs)

Parámetros
packageFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

Lanza
InstallException

paquete de instalación

public void installPackage (String packageFilePath, 
                boolean reinstall, 
                String... extraArgs)

Parámetros
packageFilePath String

reinstall boolean

extraArgs String

Lanza
InstallException

instalarPaquetes

public void installPackages ( apkFilePaths, 
                boolean reinstall, 
                 extraArgs, 
                long timeOutInMs, 
                TimeUnit timeunit)

Parámetros
apkFilePaths

reinstall boolean

extraArgs

timeOutInMs long

timeunit TimeUnit

Lanza
InstallException

instalarPaqueteRemoto

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                String... extraArgs)

Parámetros
remoteFilePath String

reinstall boolean

receiver InstallReceiver

extraArgs String

Lanza
InstallException

instalarPaqueteRemoto

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                String... extraArgs)

Parámetros
remoteFilePath String

reinstall boolean

extraArgs String

Lanza
InstallException

instalarPaqueteRemoto

public void installRemotePackage (String remoteFilePath, 
                boolean reinstall, 
                InstallReceiver receiver, 
                long maxTimeout, 
                long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits, 
                String... extraArgs)

Parámetros
remoteFilePath String

reinstall boolean

receiver InstallReceiver

maxTimeout long

maxTimeToOutputResponse long

maxTimeUnits TimeUnit

extraArgs String

Lanza
InstallException

esBootLoader

public boolean isBootLoader ()

Devoluciones
boolean

esEmulador

public boolean isEmulator ()

Devoluciones
boolean

fuera de linea

public boolean isOffline ()

Devoluciones
boolean

está en linea

public boolean isOnline ()

Devoluciones
boolean

esraíz

public boolean isRoot ()

Devoluciones
boolean

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

extraer archivo

public void pullFile (String remote, 
                String local)

Parámetros
remote String

local String

Lanza
AdbCommandRejectedException
SyncException
TimeoutException

empujar archivo

public void pushFile (String local, 
                String remote)

Parámetros
local String

remote String

Lanza
AdbCommandRejectedException
SyncException
TimeoutException

reiniciar

public void reboot (String into)

Parámetros
into String

Lanza
AdbCommandRejectedException
TimeoutException

eliminarAdelante

public void removeForward (int localPort)

Parámetros
localPort int

Lanza
AdbCommandRejectedException
TimeoutException

eliminarAdelante

public void removeForward (int localPort, 
                int remotePort)

Parámetros
localPort int

remotePort int

Lanza
AdbCommandRejectedException
TimeoutException

eliminarAdelante

public void removeForward (int localPort, 
                String remoteSocketName, 
                IDevice.DeviceUnixSocketNamespace namespace)

Parámetros
localPort int

remoteSocketName String

namespace IDevice.DeviceUnixSocketNamespace

Lanza
AdbCommandRejectedException
TimeoutException

removeRemotePackage

public void removeRemotePackage (String remoteFilePath)

Parámetros
remoteFilePath String

Lanza
InstallException

removeReverse

public void removeReverse (int remotePort)

Parámetros
remotePort int

Lanza
AdbCommandRejectedException
TimeoutException

raíz

public boolean root ()

Devoluciones
boolean

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

ejecutarEventLogService

public void runEventLogService (LogReceiver receiver)

Parámetros
receiver LogReceiver

Lanza
AdbCommandRejectedException
TimeoutException

runLogService

public void runLogService (String logname, 
                LogReceiver receiver)

Parámetros
logname String

receiver LogReceiver

Lanza
AdbCommandRejectedException
TimeoutException

setSerial

public void setSerial (String serial)

Parámetros
serial String

iniciarScreenRecorder

public void startScreenRecorder (String remoteFilePath, 
                ScreenRecorderOptions options, 
                IShellOutputReceiver receiver)

Parámetros
remoteFilePath String

options ScreenRecorderOptions

receiver IShellOutputReceiver

Lanza
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

apoyaCaracterística

public boolean supportsFeature (IDevice.HardwareFeature arg0)

Parámetros
arg0 IDevice.HardwareFeature

Devoluciones
boolean

apoyaCaracterística

public boolean supportsFeature (IDevice.Feature feature)

Parámetros
feature IDevice.Feature

Devoluciones
boolean

syncPackageToDevice

public String syncPackageToDevice (String localFilePath)

Parámetros
localFilePath String

Devoluciones
String

Lanza
AdbCommandRejectedException
SyncException
TimeoutException

desinstalar aplicación

public String uninstallApp (String applicationID, 
                String... extraArgs)

Parámetros
applicationID String

extraArgs String

Devoluciones
String

Lanza
InstallException

desinstalarPaquete

public String uninstallPackage (String packageName)

Parámetros
packageName String

Devoluciones
String

Lanza
InstallException