|
||||||||
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 int |
getApiLevel()
Returns the API level of the device, or 0 if it could not be queried. |
abstract int |
getDensity()
|
abstract int |
getHeight()
|
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 |
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 int getApiLevel()
@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 |