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