to top
public class

StubDevice

extends Object
implements IDevice
java.lang.Object
   ↳ com.android.tradefed.device.StubDevice
Known Direct Subclasses

Class Overview

Stub placeholder implementation of a IDevice.

Summary

[Expand]
Inherited Constants
From interface com.android.ddmlib.IDevice
Public Constructors
StubDevice(String serial)
Public Methods
boolean arePropertiesSet()
void createForward(int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)
void createForward(int localPort, int remotePort)
void executeShellCommand(String command, IShellOutputReceiver receiver)
void executeShellCommand(String command, IShellOutputReceiver receiver, int maxTimeToOutputResponse)
void executeShellCommand(String command, IShellOutputReceiver receiver, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)
List<String> getAbis()
int getApiLevel()
String getAvdName()
Future<Integer> getBattery(long freshnessTime, TimeUnit timeUnit)
Future<Integer> getBattery()
Integer getBatteryLevel(long freshnessMs)
Integer getBatteryLevel()
Client getClient(String applicationName)
String getClientName(int pid)
Client[] getClients()
int getDensity()
FileListingService getFileListingService()
String getLanguage()
String getMountPoint(String name)
String getName()
Map<String, String> getProperties()
String getProperty(String name)
String getPropertyCacheOrSync(String name)
int getPropertyCount()
String getPropertySync(String name)
String getRegion()
RawImage getScreenshot()
RawImage getScreenshot(long timeout, TimeUnit unit)
String getSerialNumber()
IDevice.DeviceState getState()
SyncService getSyncService()
Future<String> getSystemProperty(String name)
boolean hasClients()
String installPackage(String packageFilePath, boolean reinstall, String... extraArgs)
void installPackages(List<String> apkFilePaths, int timeOutInMs, boolean reinstall, String... extraArgs)
String installRemotePackage(String remoteFilePath, boolean reinstall, String... extraArgs)
boolean isBootLoader()
boolean isEmulator()
boolean isOffline()
boolean isOnline()
void pullFile(String remote, String local)
void pushFile(String local, String remote)
void reboot(String into)
void removeForward(int localPort, int remotePort)
void removeForward(int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)
void removeRemotePackage(String remoteFilePath)
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 uninstallPackage(String packageName)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.ddmlib.IDevice
From interface com.android.ddmlib.IShellEnabledDevice

Public Constructors

public StubDevice (String serial)

Parameters
serial String

Public Methods

public boolean arePropertiesSet ()

Returns
boolean

public void createForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)

Parameters
localPort int
remoteSocketName String
namespace IDevice.DeviceUnixSocketNamespace
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void createForward (int localPort, int remotePort)

Parameters
localPort int
remotePort int
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void executeShellCommand (String command, IShellOutputReceiver receiver)

Parameters
command String
receiver IShellOutputReceiver
Throws
TimeoutException
AdbCommandRejectedException
ShellCommandUnresponsiveException
IOException

public void executeShellCommand (String command, IShellOutputReceiver receiver, int maxTimeToOutputResponse)

Parameters
command String
receiver IShellOutputReceiver
maxTimeToOutputResponse int
Throws
TimeoutException
AdbCommandRejectedException
ShellCommandUnresponsiveException
IOException

public void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputResponse, TimeUnit maxTimeUnits)

Parameters
command String
receiver IShellOutputReceiver
maxTimeToOutputResponse long
maxTimeUnits TimeUnit
Throws
TimeoutException
AdbCommandRejectedException
ShellCommandUnresponsiveException
IOException

public List<String> getAbis ()

Returns
List<String>

public int getApiLevel ()

Returns
int

public String getAvdName ()

Returns
String

public Future<Integer> getBattery (long freshnessTime, TimeUnit timeUnit)

Parameters
freshnessTime long
timeUnit TimeUnit
Returns
Future<Integer>

public Future<Integer> getBattery ()

Returns
Future<Integer>

public Integer getBatteryLevel (long freshnessMs)

Parameters
freshnessMs long
Returns
Integer
Throws
TimeoutException
AdbCommandRejectedException
IOException
ShellCommandUnresponsiveException

public Integer getBatteryLevel ()

Returns
Integer
Throws
TimeoutException
AdbCommandRejectedException
IOException
ShellCommandUnresponsiveException

public Client getClient (String applicationName)

Parameters
applicationName String
Returns
Client

public String getClientName (int pid)

Parameters
pid int
Returns
String

public Client[] getClients ()

Returns
Client[]

public int getDensity ()

Returns
int

public FileListingService getFileListingService ()

Returns
FileListingService

public String getLanguage ()

Returns
String

public String getMountPoint (String name)

Parameters
name String
Returns
String

public String getName ()

Returns
String

public Map<String, String> getProperties ()

Returns
Map<String, String>

public String getProperty (String name)

Parameters
name String
Returns
String

public String getPropertyCacheOrSync (String name)

Parameters
name String
Returns
String
Throws
TimeoutException
AdbCommandRejectedException
ShellCommandUnresponsiveException
IOException

public int getPropertyCount ()

Returns
int

public String getPropertySync (String name)

Parameters
name String
Returns
String
Throws
TimeoutException
AdbCommandRejectedException
ShellCommandUnresponsiveException
IOException

public String getRegion ()

Returns
String

public RawImage getScreenshot ()

Returns
RawImage
Throws
TimeoutException
AdbCommandRejectedException
IOException

public RawImage getScreenshot (long timeout, TimeUnit unit)

Parameters
timeout long
unit TimeUnit
Returns
RawImage
Throws
TimeoutException
AdbCommandRejectedException
IOException

public String getSerialNumber ()

Returns
String

public IDevice.DeviceState getState ()

Returns
IDevice.DeviceState

public SyncService getSyncService ()

Returns
SyncService
Throws
TimeoutException
AdbCommandRejectedException
IOException

public Future<String> getSystemProperty (String name)

Parameters
name String
Returns
Future<String>

public boolean hasClients ()

Returns
boolean

public String installPackage (String packageFilePath, boolean reinstall, String... extraArgs)

Parameters
packageFilePath String
reinstall boolean
extraArgs String
Returns
String
Throws
InstallException

public void installPackages (List<String> apkFilePaths, int timeOutInMs, boolean reinstall, String... extraArgs)

Parameters
apkFilePaths List
timeOutInMs int
reinstall boolean
extraArgs String
Throws
InstallException

public String installRemotePackage (String remoteFilePath, boolean reinstall, String... extraArgs)

Parameters
remoteFilePath String
reinstall boolean
extraArgs String
Returns
String
Throws
InstallException

public boolean isBootLoader ()

Returns
boolean

public boolean isEmulator ()

Returns
boolean

public boolean isOffline ()

Returns
boolean

public boolean isOnline ()

Returns
boolean

public void pullFile (String remote, String local)

Parameters
remote String
local String
Throws
IOException
AdbCommandRejectedException
TimeoutException
SyncException

public void pushFile (String local, String remote)

Parameters
local String
remote String
Throws
IOException
AdbCommandRejectedException
TimeoutException
SyncException

public void reboot (String into)

Parameters
into String
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void removeForward (int localPort, int remotePort)

Parameters
localPort int
remotePort int
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void removeForward (int localPort, String remoteSocketName, IDevice.DeviceUnixSocketNamespace namespace)

Parameters
localPort int
remoteSocketName String
namespace IDevice.DeviceUnixSocketNamespace
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void removeRemotePackage (String remoteFilePath)

Parameters
remoteFilePath String
Throws
InstallException

public void runEventLogService (LogReceiver receiver)

Parameters
receiver LogReceiver
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void runLogService (String logname, LogReceiver receiver)

Parameters
logname String
receiver LogReceiver
Throws
TimeoutException
AdbCommandRejectedException
IOException

public void setSerial (String serial)

Parameters
serial String

public void startScreenRecorder (String remoteFilePath, ScreenRecorderOptions options, IShellOutputReceiver receiver)

Parameters
remoteFilePath String
options ScreenRecorderOptions
receiver IShellOutputReceiver
Throws
TimeoutException
AdbCommandRejectedException
IOException
ShellCommandUnresponsiveException

public boolean supportsFeature (IDevice.HardwareFeature arg0)

Parameters
arg0 IDevice.HardwareFeature
Returns
boolean

public boolean supportsFeature (IDevice.Feature feature)

Parameters
feature IDevice.Feature
Returns
boolean

public String syncPackageToDevice (String localFilePath)

Parameters
localFilePath String
Returns
String
Throws
TimeoutException
AdbCommandRejectedException
IOException
SyncException

public String uninstallPackage (String packageName)

Parameters
packageName String
Returns
String
Throws
InstallException