IDeviceSelection

public interface IDeviceSelection
implements IMatcher<IDevice>

com.android.tradefed.device.IDeviceSelection
Known Indirect Subclasses
DeviceSelectionOptions Container for for device selection criteria. 


Interface for device selection criteria.

Summary

Public methods

abstract boolean deviceRequested()
abstract boolean emulatorRequested()
abstract Integer getBatteryLevel(IDevice device)

Retrieves the battery level for the given device

abstract String getDeviceProductType(IDevice device)

Gets the given devices product type

abstract String getDeviceProductVariant(IDevice device)

Gets the given devices product variant

abstract Collection<String> getExcludeSerials()

Gets a copy of the serial numbers exclusion list

abstract Collection<String> getProductTypes()

Gets a copy of the product type list

abstract Map<String, String> getProperties()

Returns a map of the property list

abstract Collection<String> getSerials()

Gets a copy of the serial numbers

abstract boolean nullDeviceRequested()
abstract void setSerial(String... serialNumber)

Set the serial numbers inclusion list, replacing any existing values.

abstract boolean stubEmulatorRequested()

Public methods

deviceRequested

boolean deviceRequested ()

Returns
boolean true if a device has been requested

emulatorRequested

boolean emulatorRequested ()

Returns
boolean true if an emulator has been requested

getBatteryLevel

Integer getBatteryLevel (IDevice device)

Retrieves the battery level for the given device

Parameters
device IDevice: the IDevice

Returns
Integer the device battery level or null if unknown

getDeviceProductType

String getDeviceProductType (IDevice device)

Gets the given devices product type

Parameters
device IDevice: the IDevice

Returns
String the device product type or null if unknown

getDeviceProductVariant

String getDeviceProductVariant (IDevice device)

Gets the given devices product variant

Parameters
device IDevice: the IDevice

Returns
String the device product variant or null if unknown

getExcludeSerials

Collection<String> getExcludeSerials ()

Gets a copy of the serial numbers exclusion list

Returns
Collection<String> a Collection of serial numbers

getProductTypes

Collection<String> getProductTypes ()

Gets a copy of the product type list

Returns
Collection<String> a Collection of product types

getProperties

Map<String, String> getProperties ()

Returns a map of the property list

Returns
Map<String, String> a Map of device property names to values

getSerials

Collection<String> getSerials ()

Gets a copy of the serial numbers

Returns
Collection<String> a Collection of serial numbers

nullDeviceRequested

boolean nullDeviceRequested ()

Returns
boolean true if a null device (aka no device required) has been requested

setSerial

void setSerial (String... serialNumber)

Set the serial numbers inclusion list, replacing any existing values.

Parameters
serialNumber String

stubEmulatorRequested

boolean stubEmulatorRequested ()

Returns
boolean true if an stub emulator has been requested. A stub emulator is a placeholder to be used when config has to launch an emulator.