|
||||||||
| 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 int |
getHeight()
|
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,
int timeout,
com.android.utils.ILogger logger)
Installs the given APK 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 |
| 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,
int timeout,
com.android.utils.ILogger logger)
throws DeviceException
apkFile - the APK file to install.timeout - the time out.
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()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||