StubDevice
public
class
StubDevice
extends Object
implements
IDevice
| java.lang.Object | |
| ↳ | com.android.tradefed.device.StubDevice |
Implementación de stub de marcador de posición 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 dejó de estar disponible.
usa |
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 dejó de estar disponible.
Usa |
Integer
|
getBatteryLevel()
Este método dejó de estar disponible.
Usa |
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 dejó de estar disponible.
Usa |
String
|
getProperty(String name)
|
String
|
getPropertyCacheOrSync(String name)
Este método dejó de estar disponible.
Usa |
int
|
getPropertyCount()
Este método dejó de estar disponible. dejó de estar disponible en ddmlib con el motivo "implementation detail". |
String
|
getPropertySync(String name)
Este método dejó de estar disponible.
Usa |
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(
|
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
arePropertiesSet
public boolean arePropertiesSet ()
| Muestra | |
|---|---|
boolean |
|
createForward
public void createForward (int localPort,
String remoteSocketName,
IDevice.DeviceUnixSocketNamespace namespace)| Parámetros | |
|---|---|
localPort |
int |
remoteSocketName |
String |
namespace |
IDevice.DeviceUnixSocketNamespace |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
createForward
public void createForward (int localPort,
int remotePort)| Parámetros | |
|---|---|
localPort |
int |
remotePort |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
createReverse
public void createReverse (int remotePort,
int localPort)| Parámetros | |
|---|---|
remotePort |
int |
localPort |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits)| Parámetros | |
|---|---|
command |
String |
receiver |
IShellOutputReceiver |
maxTimeToOutputResponse |
long |
maxTimeUnits |
TimeUnit |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)| Parámetros | |
|---|---|
command |
String |
receiver |
IShellOutputReceiver |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
int maxTimeToOutputResponse)
Este método dejó de estar disponible.
usa executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit).
| Parámetros | |
|---|---|
command |
String |
receiver |
IShellOutputReceiver |
maxTimeToOutputResponse |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
executeShellCommand
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 |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
getAbis
publicgetAbis ()
| Muestra | |
|---|---|
|
|
getAvdName
public String getAvdName ()
| Muestra | |
|---|---|
String |
|
getAvdPath
public String getAvdPath ()
| Muestra | |
|---|---|
String |
|
getBattery
publicgetBattery (long freshnessTime, TimeUnit timeUnit)
| Parámetros | |
|---|---|
freshnessTime |
long |
timeUnit |
TimeUnit |
| Muestra | |
|---|---|
|
|
getBattery
publicgetBattery ()
| Muestra | |
|---|---|
|
|
getBatteryLevel
public Integer getBatteryLevel (long freshnessMs)
Este método dejó de estar disponible.
Usa getBattery(long, TimeUnit) en su lugar.
| Parámetros | |
|---|---|
freshnessMs |
long |
| Muestra | |
|---|---|
Integer |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
getBatteryLevel
public Integer getBatteryLevel ()
Este método dejó de estar disponible.
Usa getBattery() en su lugar.
| Muestra | |
|---|---|
Integer |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
getClient
public Client getClient (String applicationName)
| Parámetros | |
|---|---|
applicationName |
String |
| Muestra | |
|---|---|
Client |
|
getClientName
public String getClientName (int pid)
| Parámetros | |
|---|---|
pid |
int |
| Muestra | |
|---|---|
String |
|
getClients
public Client[] getClients ()
| Muestra | |
|---|---|
Client[] |
|
getDensity
public int getDensity ()
| Muestra | |
|---|---|
int |
|
getFileListingService
public FileListingService getFileListingService ()
| Muestra | |
|---|---|
FileListingService |
|
getLanguage
public String getLanguage ()
| Muestra | |
|---|---|
String |
|
getMountPoint
public String getMountPoint (String name)
| Parámetros | |
|---|---|
name |
String |
| Muestra | |
|---|---|
String |
|
getName
public String getName ()
| Muestra | |
|---|---|
String |
|
getProperties
publicgetProperties ()
Este método dejó de estar disponible.
Usa getSystemProperty(String) en su lugar.
| Muestra | |
|---|---|
|
|
getProperty
public String getProperty (String name)
| Parámetros | |
|---|---|
name |
String |
| Muestra | |
|---|---|
String |
|
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Este método dejó de estar disponible.
Usa getProperty(String) en su lugar.
| Parámetros | |
|---|---|
name |
String |
| Muestra | |
|---|---|
String |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
getPropertyCount
public int getPropertyCount ()
Este método dejó de estar disponible.
dejó de estar disponible en ddmlib con el motivo "detalles de implementación".
| Muestra | |
|---|---|
int |
|
getPropertySync
public String getPropertySync (String name)
Este método dejó de estar disponible.
Usa getProperty(String) en su lugar.
| Parámetros | |
|---|---|
name |
String |
| Muestra | |
|---|---|
String |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
getRegion
public String getRegion ()
| Muestra | |
|---|---|
String |
|
getScreenshot
public RawImage getScreenshot ()
| Muestra | |
|---|---|
RawImage |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
getScreenshot
public RawImage getScreenshot (long timeout,
TimeUnit unit)| Parámetros | |
|---|---|
timeout |
long |
unit |
TimeUnit |
| Muestra | |
|---|---|
RawImage |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
getSerialNumber
public String getSerialNumber ()
| Muestra | |
|---|---|
String |
|
getState
public IDevice.DeviceState getState ()
| Muestra | |
|---|---|
IDevice.DeviceState |
|
getSyncService
public SyncService getSyncService ()
| Muestra | |
|---|---|
SyncService |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
getSystemProperty
public ListenableFuture<String> getSystemProperty (String name)
| Parámetros | |
|---|---|
name |
String |
| Muestra | |
|---|---|
ListenableFuture<String> |
|
getVersion
public AndroidVersion getVersion ()
| Muestra | |
|---|---|
AndroidVersion |
|
hasClients
public boolean hasClients ()
| Muestra | |
|---|---|
boolean |
|
installPackage
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 |
| Arroja | |
|---|---|
InstallException |
|
installPackage
public void installPackage (String packageFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)| Parámetros | |
|---|---|
packageFilePath |
String |
reinstall |
boolean |
receiver |
InstallReceiver |
extraArgs |
String |
| Arroja | |
|---|---|
InstallException |
|
installPackage
public void installPackage (String packageFilePath,
boolean reinstall,
String... extraArgs)| Parámetros | |
|---|---|
packageFilePath |
String |
reinstall |
boolean |
extraArgs |
String |
| Arroja | |
|---|---|
InstallException |
|
installPackages
public void installPackages (apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit)
| Parámetros | |
|---|---|
apkFilePaths |
|
reinstall |
boolean |
extraArgs |
|
timeOutInMs |
long |
timeunit |
TimeUnit |
| Arroja | |
|---|---|
InstallException |
|
installRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)| Parámetros | |
|---|---|
remoteFilePath |
String |
reinstall |
boolean |
receiver |
InstallReceiver |
extraArgs |
String |
| Arroja | |
|---|---|
InstallException |
|
installRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
String... extraArgs)| Parámetros | |
|---|---|
remoteFilePath |
String |
reinstall |
boolean |
extraArgs |
String |
| Arroja | |
|---|---|
InstallException |
|
installRemotePackage
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 |
| Arroja | |
|---|---|
InstallException |
|
isBootLoader
public boolean isBootLoader ()
| Muestra | |
|---|---|
boolean |
|
isEmulator
public boolean isEmulator ()
| Muestra | |
|---|---|
boolean |
|
isOffline
public boolean isOffline ()
| Muestra | |
|---|---|
boolean |
|
isOnline
public boolean isOnline ()
| Muestra | |
|---|---|
boolean |
|
isRoot
public boolean isRoot ()
| Muestra | |
|---|---|
boolean |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
pullFile
public void pullFile (String remote,
String local)| Parámetros | |
|---|---|
remote |
String |
local |
String |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
SyncException |
|
TimeoutException |
|
pushFile
public void pushFile (String local,
String remote)| Parámetros | |
|---|---|
local |
String |
remote |
String |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
SyncException |
|
TimeoutException |
|
reiniciar
public void reboot (String into)
| Parámetros | |
|---|---|
into |
String |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
removeForward
public void removeForward (int localPort)
| Parámetros | |
|---|---|
localPort |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
removeForward
public void removeForward (int localPort,
int remotePort)| Parámetros | |
|---|---|
localPort |
int |
remotePort |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
removeForward
public void removeForward (int localPort,
String remoteSocketName,
IDevice.DeviceUnixSocketNamespace namespace)| Parámetros | |
|---|---|
localPort |
int |
remoteSocketName |
String |
namespace |
IDevice.DeviceUnixSocketNamespace |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
removeRemotePackage
public void removeRemotePackage (String remoteFilePath)
| Parámetros | |
|---|---|
remoteFilePath |
String |
| Arroja | |
|---|---|
InstallException |
|
removeReverse
public void removeReverse (int remotePort)
| Parámetros | |
|---|---|
remotePort |
int |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
root
public boolean root ()
| Muestra | |
|---|---|
boolean |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
runEventLogService
public void runEventLogService (LogReceiver receiver)
| Parámetros | |
|---|---|
receiver |
LogReceiver |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
runLogService
public void runLogService (String logname,
LogReceiver receiver)| Parámetros | |
|---|---|
logname |
String |
receiver |
LogReceiver |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
TimeoutException |
|
setSerial
public void setSerial (String serial)
| Parámetros | |
|---|---|
serial |
String |
startScreenRecorder
public void startScreenRecorder (String remoteFilePath,
ScreenRecorderOptions options,
IShellOutputReceiver receiver)| Parámetros | |
|---|---|
remoteFilePath |
String |
options |
ScreenRecorderOptions |
receiver |
IShellOutputReceiver |
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
ShellCommandUnresponsiveException |
|
TimeoutException |
|
supportsFeature
public boolean supportsFeature (IDevice.HardwareFeature arg0)
| Parámetros | |
|---|---|
arg0 |
IDevice.HardwareFeature |
| Muestra | |
|---|---|
boolean |
|
supportsFeature
public boolean supportsFeature (IDevice.Feature feature)
| Parámetros | |
|---|---|
feature |
IDevice.Feature |
| Muestra | |
|---|---|
boolean |
|
syncPackageToDevice
public String syncPackageToDevice (String localFilePath)
| Parámetros | |
|---|---|
localFilePath |
String |
| Muestra | |
|---|---|
String |
|
| Arroja | |
|---|---|
AdbCommandRejectedException |
|
SyncException |
|
TimeoutException |
|
uninstallApp
public String uninstallApp (String applicationID,
String... extraArgs)| Parámetros | |
|---|---|
applicationID |
String |
extraArgs |
String |
| Muestra | |
|---|---|
String |
|
| Arroja | |
|---|---|
InstallException |
|
uninstallPackage
public String uninstallPackage (String packageName)
| Parámetros | |
|---|---|
packageName |
String |
| Muestra | |
|---|---|
String |
|
| Arroja | |
|---|---|
InstallException |
|