Стабдевице
public class StubDevice
extends Object implements IDevice
| java.lang.Объект | |
| ↳ | com.android.tradefed.device.StubDevice |
Реализация заполнителя-заглушки IDevice .
Краткое содержание
Общественные конструкторы | |
|---|---|
StubDevice (String serial) | |
StubDevice (String serial, boolean isEmulator) | |
Публичные методы | |
|---|---|
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) Этот метод устарел. используйте |
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) Этот метод устарел. вместо этого используйте |
Integer | getBatteryLevel () Этот метод устарел. вместо этого используйте |
Client | getClient (String applicationName) |
String | getClientName (int pid) |
Client[] | getClients () |
int | getDensity () |
FileListingService | getFileListingService () |
String | getLanguage () |
String | getMountPoint (String name) |
String | getName () |
getProperties () Этот метод устарел. вместо этого используйте | |
String | getProperty (String name) |
String | getPropertyCacheOrSync (String name) Этот метод устарел. вместо этого используйте |
int | getPropertyCount ()Этот метод устарел. устарел в ddmlib по причине «деталей реализации». |
String | getPropertySync (String name) Этот метод устарел. вместо этого используйте |
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)
|
Общественные конструкторы
Стабдевице
public StubDevice (String serial)
| Параметры | |
|---|---|
serial | String |
Стабдевице
public StubDevice (String serial,
boolean isEmulator)| Параметры | |
|---|---|
serial | String |
isEmulator | boolean |
Публичные методы
arePropertiesSet
public boolean arePropertiesSet ()
| Возврат | |
|---|---|
boolean | |
создатьForward
public void createForward (int localPort,
String remoteSocketName,
IDevice.DeviceUnixSocketNamespace namespace)| Параметры | |
|---|---|
localPort | int |
remoteSocketName | String |
namespace | IDevice.DeviceUnixSocketNamespace |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
создатьForward
public void createForward (int localPort,
int remotePort)| Параметры | |
|---|---|
localPort | int |
remotePort | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
создатьReverse
public void createReverse (int remotePort,
int localPort)| Параметры | |
|---|---|
remotePort | int |
localPort | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
выполнитьShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits)| Параметры | |
|---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
выполнитьShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)| Параметры | |
|---|---|
command | String |
receiver | IShellOutputReceiver |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
выполнитьShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
int maxTimeToOutputResponse) Этот метод устарел.
используйте executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit) .
| Параметры | |
|---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputResponse | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
выполнитьShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeout,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits)| Параметры | |
|---|---|
command | String |
receiver | IShellOutputReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getAbis
publicgetAbis ()
| Возврат | |
|---|---|
getAvdName
public String getAvdName ()
| Возврат | |
|---|---|
String | |
getAvdPath
public String getAvdPath ()
| Возврат | |
|---|---|
String | |
getBattery
publicgetBattery (long freshnessTime, TimeUnit timeUnit)
| Параметры | |
|---|---|
freshnessTime | long |
timeUnit | TimeUnit |
| Возврат | |
|---|---|
getBattery
publicgetBattery ()
| Возврат | |
|---|---|
getBatteryLevel
public Integer getBatteryLevel (long freshnessMs)
Этот метод устарел.
вместо этого используйте getBattery(long, TimeUnit) .
| Параметры | |
|---|---|
freshnessMs | long |
| Возврат | |
|---|---|
Integer | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getBatteryLevel
public Integer getBatteryLevel ()
Этот метод устарел.
вместо этого используйте getBattery() .
| Возврат | |
|---|---|
Integer | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getClient
public Client getClient (String applicationName)
| Параметры | |
|---|---|
applicationName | String |
| Возврат | |
|---|---|
Client | |
getClientName
public String getClientName (int pid)
| Параметры | |
|---|---|
pid | int |
| Возврат | |
|---|---|
String | |
получитьклиенты
public Client[] getClients ()
| Возврат | |
|---|---|
Client[] | |
getDensity
public int getDensity ()
| Возврат | |
|---|---|
int | |
GetFileListingService
public FileListingService getFileListingService ()
| Возврат | |
|---|---|
FileListingService | |
getLanguage
public String getLanguage ()
| Возврат | |
|---|---|
String | |
getMountPoint
public String getMountPoint (String name)
| Параметры | |
|---|---|
name | String |
| Возврат | |
|---|---|
String | |
getName
public String getName ()
| Возврат | |
|---|---|
String | |
получить свойства
publicgetProperties ()
Этот метод устарел.
вместо этого используйте getSystemProperty(String) .
| Возврат | |
|---|---|
getProperty
public String getProperty (String name)
| Параметры | |
|---|---|
name | String |
| Возврат | |
|---|---|
String | |
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Этот метод устарел.
вместо этого используйте getProperty(String) .
| Параметры | |
|---|---|
name | String |
| Возврат | |
|---|---|
String | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getPropertyCount
public int getPropertyCount ()
Этот метод устарел.
устарел в ddmlib по причине «деталей реализации».
| Возврат | |
|---|---|
int | |
getPropertySync
public String getPropertySync (String name)
Этот метод устарел.
вместо этого используйте getProperty(String) .
| Параметры | |
|---|---|
name | String |
| Возврат | |
|---|---|
String | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getRegion
public String getRegion ()
| Возврат | |
|---|---|
String | |
getScreenshot
public RawImage getScreenshot ()
| Возврат | |
|---|---|
RawImage | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
getScreenshot
public RawImage getScreenshot (long timeout,
TimeUnit unit)| Параметры | |
|---|---|
timeout | long |
unit | TimeUnit |
| Возврат | |
|---|---|
RawImage | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
получитьсерийный номер
public String getSerialNumber ()
| Возврат | |
|---|---|
String | |
getState
public IDevice.DeviceState getState ()
| Возврат | |
|---|---|
IDevice.DeviceState | |
getSyncService
public SyncService getSyncService ()
| Возврат | |
|---|---|
SyncService | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
getSystemProperty
public ListenableFuture<String> getSystemProperty (String name)
| Параметры | |
|---|---|
name | String |
| Возврат | |
|---|---|
ListenableFuture<String> | |
получить версию
public AndroidVersion getVersion ()
| Возврат | |
|---|---|
AndroidVersion | |
имеетКлиенты
public boolean hasClients ()
| Возврат | |
|---|---|
boolean | |
установитьПакет
public void installPackage (String packageFilePath,
boolean reinstall,
InstallReceiver receiver,
long maxTimeout,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits,
String... extraArgs)| Параметры | |
|---|---|
packageFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
установитьПакет
public void installPackage (String packageFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)| Параметры | |
|---|---|
packageFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
установитьПакет
public void installPackage (String packageFilePath,
boolean reinstall,
String... extraArgs)| Параметры | |
|---|---|
packageFilePath | String |
reinstall | boolean |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
установитьПакеты
public void installPackages (apkFilePaths, boolean reinstall, extraArgs, long timeOutInMs, TimeUnit timeunit)
| Параметры | |
|---|---|
apkFilePaths | |
reinstall | boolean |
extraArgs | |
timeOutInMs | long |
timeunit | TimeUnit |
| Броски | |
|---|---|
InstallException | |
установитьRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
InstallReceiver receiver,
String... extraArgs)| Параметры | |
|---|---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
установитьRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
String... extraArgs)| Параметры | |
|---|---|
remoteFilePath | String |
reinstall | boolean |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
установитьRemotePackage
public void installRemotePackage (String remoteFilePath,
boolean reinstall,
InstallReceiver receiver,
long maxTimeout,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits,
String... extraArgs)| Параметры | |
|---|---|
remoteFilePath | String |
reinstall | boolean |
receiver | InstallReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
extraArgs | String |
| Броски | |
|---|---|
InstallException | |
isBootLoader
public boolean isBootLoader ()
| Возврат | |
|---|---|
boolean | |
isEmulator
public boolean isEmulator ()
| Возврат | |
|---|---|
boolean | |
isOffline
public boolean isOffline ()
| Возврат | |
|---|---|
boolean | |
isOnline
public boolean isOnline ()
| Возврат | |
|---|---|
boolean | |
isRoot
public boolean isRoot ()
| Возврат | |
|---|---|
boolean | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
вытащить файл
public void pullFile (String remote,
String local)| Параметры | |
|---|---|
remote | String |
local | String |
| Броски | |
|---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException | |
pushFile
public void pushFile (String local,
String remote)| Параметры | |
|---|---|
local | String |
remote | String |
| Броски | |
|---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException | |
перезагрузить
public void reboot (String into)
| Параметры | |
|---|---|
into | String |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
удалить Форвард
public void removeForward (int localPort)
| Параметры | |
|---|---|
localPort | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
удалить Форвард
public void removeForward (int localPort,
int remotePort)| Параметры | |
|---|---|
localPort | int |
remotePort | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
удалить Форвард
public void removeForward (int localPort,
String remoteSocketName,
IDevice.DeviceUnixSocketNamespace namespace)| Параметры | |
|---|---|
localPort | int |
remoteSocketName | String |
namespace | IDevice.DeviceUnixSocketNamespace |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
удалитьRemotePackage
public void removeRemotePackage (String remoteFilePath)
| Параметры | |
|---|---|
remoteFilePath | String |
| Броски | |
|---|---|
InstallException | |
удалитьReverse
public void removeReverse (int remotePort)
| Параметры | |
|---|---|
remotePort | int |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
корень
public boolean root ()
| Возврат | |
|---|---|
boolean | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
запуститьEventLogService
public void runEventLogService (LogReceiver receiver)
| Параметры | |
|---|---|
receiver | LogReceiver |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
запуститьлогсервице
public void runLogService (String logname,
LogReceiver receiver)| Параметры | |
|---|---|
logname | String |
receiver | LogReceiver |
| Броски | |
|---|---|
AdbCommandRejectedException | |
TimeoutException | |
setSerial
public void setSerial (String serial)
| Параметры | |
|---|---|
serial | String |
startScreenRecorder
public void startScreenRecorder (String remoteFilePath,
ScreenRecorderOptions options,
IShellOutputReceiver receiver)| Параметры | |
|---|---|
remoteFilePath | String |
options | ScreenRecorderOptions |
receiver | IShellOutputReceiver |
| Броски | |
|---|---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
поддерживаетОсобенность
public boolean supportsFeature (IDevice.HardwareFeature arg0)
| Параметры | |
|---|---|
arg0 | IDevice.HardwareFeature |
| Возврат | |
|---|---|
boolean | |
поддерживаетОсобенность
public boolean supportsFeature (IDevice.Feature feature)
| Параметры | |
|---|---|
feature | IDevice.Feature |
| Возврат | |
|---|---|
boolean | |
syncPackageToDevice
public String syncPackageToDevice (String localFilePath)
| Параметры | |
|---|---|
localFilePath | String |
| Возврат | |
|---|---|
String | |
| Броски | |
|---|---|
AdbCommandRejectedException | |
SyncException | |
TimeoutException | |
удалить приложение
public String uninstallApp (String applicationID,
String... extraArgs)| Параметры | |
|---|---|
applicationID | String |
extraArgs | String |
| Возврат | |
|---|---|
String | |
| Броски | |
|---|---|
InstallException | |
удалить пакет
public String uninstallPackage (String packageName)
| Параметры | |
|---|---|
packageName | String |
| Возврат | |
|---|---|
String | |
| Броски | |
|---|---|
InstallException | |