IDeviceSelection

public interface IDeviceSelection
implements IMatcher<IDevice>

com.android.tradefed.device.IDeviceSelection


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(IDevice device)

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

public abstract boolean deviceRequested ()

Returns
boolean true if a device has been requested

emulatorRequested

public abstract boolean emulatorRequested ()

Returns
boolean true if an emulator has been requested

getBatteryLevel

public abstract 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

public abstract 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

public abstract 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

public abstract Collection<String> getExcludeSerials ()

Gets a copy of the serial numbers exclusion list

Returns
Collection<String> a Collection of serial numbers

getProductTypes

public abstract Collection<String> getProductTypes ()

Gets a copy of the product type list

Returns
Collection<String> a Collection of product types

getProperties

public abstract Map<String, String> getProperties ()

Returns a map of the property list

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

getSerials

public abstract Collection<String> getSerials (IDevice device)

Gets a copy of the serial numbers

Parameters
device IDevice: The IDevice representing the device considered for selection.

Returns
Collection<String> a Collection of serial numbers

nullDeviceRequested

public abstract boolean nullDeviceRequested ()

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

setSerial

public abstract void setSerial (String... serialNumber)

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

Parameters
serialNumber String

stubEmulatorRequested

public abstract 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.