|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.android.builder.testing.api.DeviceConnector
@Beta public abstract class DeviceConnector
A connector to a device to install/uninstall APKs, and run shell command.
| Constructor Summary | |
|---|---|
DeviceConnector()
|
|
| Method Summary | |
|---|---|
abstract void |
connect(int timeOut,
com.android.utils.ILogger logger)
Establishes the connection with the device. |
abstract void |
disconnect(int timeOut,
com.android.utils.ILogger logger)
Disconnects from the device. |
abstract java.util.List<java.lang.String> |
getAbis()
The device supported ABIs. |
abstract java.lang.String |
getApiCodeName()
Returns the API codename for the device, or null if it's a release device. |
abstract int |
getApiLevel()
Returns the API level of the device, or 0 if it could not be queried. |
abstract int |
getDensity()
Returns the screen density bucket for the device. |
abstract DeviceConfig |
getDeviceConfig()
|
abstract int |
getHeight()
|
abstract java.lang.String |
getLanguage()
Returns the user's language. |
abstract java.lang.String |
getProperty(java.lang.String propertyName)
|
abstract java.lang.String |
getRegion()
Returns the user's region. |
abstract java.lang.String |
getSerialNumber()
Returns the serial number of the device. |
abstract com.android.ddmlib.IDevice.DeviceState |
getState()
Returns the IDevice.DeviceState for the device, or null
if if cannot determined. |
abstract int |
getWidth()
|
abstract void |
installPackage(java.io.File apkFile,
java.util.Collection<java.lang.String> options,
int timeout,
com.android.utils.ILogger logger)
Installs the given APK on the device. |
abstract void |
installPackages(java.util.List<java.io.File> apkFiles,
java.util.Collection<java.lang.String> options,
int timeoutInMs,
com.android.utils.ILogger logger)
Installs the given APK files on the device. |
abstract void |
pullFile(java.lang.String remote,
java.lang.String local)
Pulls a single file. |
abstract void |
uninstallPackage(java.lang.String packageName,
int timeout,
com.android.utils.ILogger logger)
Uninstall the given package name from the device |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.android.ddmlib.IShellEnabledDevice |
|---|
executeShellCommand, getName, getSystemProperty |
| Constructor Detail |
|---|
public DeviceConnector()
| Method Detail |
|---|
public abstract void connect(int timeOut,
com.android.utils.ILogger logger)
throws com.android.ddmlib.TimeoutException
timeOut - the time out.
com.android.ddmlib.TimeoutException
public abstract void disconnect(int timeOut,
com.android.utils.ILogger logger)
throws com.android.ddmlib.TimeoutException
timeOut - the time out.
com.android.ddmlib.TimeoutException
public abstract void installPackage(@NonNull
java.io.File apkFile,
@NonNull
java.util.Collection<java.lang.String> options,
int timeout,
com.android.utils.ILogger logger)
throws DeviceException
apkFile - the APK file to install.timeout - the time out.logger - the logger to use to log debug, warnings and errors.
DeviceException
public abstract void installPackages(@NonNull
java.util.List<java.io.File> apkFiles,
@NonNull
java.util.Collection<java.lang.String> options,
int timeoutInMs,
com.android.utils.ILogger logger)
throws DeviceException
DeviceException will be thrown.
apkFiles - the APK files to install.options - the install options.timeoutInMs - the time out in milliseconds.logger - the logger to use to log debug, warnings and errors.
DeviceException
public abstract void uninstallPackage(@NonNull
java.lang.String packageName,
int timeout,
com.android.utils.ILogger logger)
throws DeviceException
packageName - the package nametimeout - the time out
DeviceException
public abstract void pullFile(java.lang.String remote,
java.lang.String local)
throws java.io.IOException
remote - the full path to the remote filelocal - The local destination.
java.io.IOException - in case of an IO exception.@NonNull public abstract java.lang.String getSerialNumber()
public abstract int getApiLevel()
public abstract java.lang.String getApiCodeName()
public abstract com.android.ddmlib.IDevice.DeviceState getState()
IDevice.DeviceState for the device, or null
if if cannot determined.
@NonNull public abstract java.util.List<java.lang.String> getAbis()
public abstract int getDensity()
public abstract int getHeight()
public abstract int getWidth()
@Nullable public abstract java.lang.String getLanguage()
@Nullable public abstract java.lang.String getRegion()
@NonNull
public abstract java.lang.String getProperty(@NonNull
java.lang.String propertyName)
@NonNull
public abstract DeviceConfig getDeviceConfig()
throws DeviceException
DeviceException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||