Стабдевице
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) |
Общественные конструкторы
Стабдевице
public StubDevice (String serial)
Стабдевице
public StubDevice (String serial,
boolean isEmulator)
Параметры |
---|
serial | String |
isEmulator | boolean |
Публичные методы
arePropertiesSet
public boolean arePropertiesSet ()
создать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,
long maxTimeout,
long maxTimeToOutputResponse,
TimeUnit maxTimeUnits)
Параметры |
---|
command | String |
receiver | IShellOutputReceiver |
maxTimeout | long |
maxTimeToOutputResponse | long |
maxTimeUnits | TimeUnit |
Броски |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getAbis
public getAbis ()
getAvdName
public String getAvdName ()
getAvdPath
public String getAvdPath ()
getBattery
public getBattery (long freshnessTime,
TimeUnit timeUnit)
Параметры |
---|
freshnessTime | long |
timeUnit | TimeUnit |
getBattery
public getBattery ()
getBatteryLevel
public Integer getBatteryLevel (long freshnessMs)
Этот метод устарел.
вместо этого используйте getBattery(long, TimeUnit)
.
Параметры |
---|
freshnessMs | long |
Броски |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getBatteryLevel
public Integer getBatteryLevel ()
Этот метод устарел.
вместо этого используйте getBattery()
.
Броски |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getClient
public Client getClient (String applicationName)
Параметры |
---|
applicationName | String |
getClientName
public String getClientName (int pid)
получитьклиенты
public Client[] getClients ()
getDensity
public int getDensity ()
GetFileListingService
public FileListingService getFileListingService ()
Возврат |
---|
FileListingService | |
getLanguage
public String getLanguage ()
getMountPoint
public String getMountPoint (String name)
getName
public String getName ()
getProperty
public String getProperty (String name)
getPropertyCacheOrSync
public String getPropertyCacheOrSync (String name)
Этот метод устарел.
вместо этого используйте getProperty(String)
.
Броски |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getPropertyCount
public int getPropertyCount ()
Этот метод устарел.
устарел в ddmlib по причине «деталей реализации».
getPropertySync
public String getPropertySync (String name)
Этот метод устарел.
вместо этого используйте getProperty(String)
.
Броски |
---|
AdbCommandRejectedException | |
ShellCommandUnresponsiveException | |
TimeoutException | |
getRegion
public String getRegion ()
getScreenshot
public RawImage getScreenshot ()
Броски |
---|
AdbCommandRejectedException | |
TimeoutException | |
getScreenshot
public RawImage getScreenshot (long timeout,
TimeUnit unit)
Параметры |
---|
timeout | long |
unit | TimeUnit |
Броски |
---|
AdbCommandRejectedException | |
TimeoutException | |
получитьсерийный номер
public String getSerialNumber ()
getState
public IDevice.DeviceState getState ()
Возврат |
---|
IDevice.DeviceState | |
getSyncService
public SyncService getSyncService ()
Броски |
---|
AdbCommandRejectedException | |
TimeoutException | |
getSystemProperty
public ListenableFuture<String> getSystemProperty (String name)
Возврат |
---|
ListenableFuture<String> | |
получить версию
public AndroidVersion getVersion ()
имеетКлиенты
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 ()
isEmulator
public boolean isEmulator ()
isOffline
public boolean isOffline ()
isOnline
public boolean isOnline ()
isRoot
public boolean isRoot ()
Броски |
---|
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)
Броски |
---|
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 | |
удалитьRemotePackage
public void removeRemotePackage (String remoteFilePath)
Параметры |
---|
remoteFilePath | String |
удалитьReverse
public void removeReverse (int remotePort)
Броски |
---|
AdbCommandRejectedException | |
TimeoutException | |
корень
public boolean root ()
Броски |
---|
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)
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 |
поддерживаетОсобенность
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 |