DeviceDescriptor

public class DeviceDescriptor
extends Object

java.lang.Object
   ↳ com.android.tradefed.command.remote.DeviceDescriptor


A class containing information describing a device under test.

Summary

Public constructors

DeviceDescriptor()
DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, String product, String productVariant, String sdkVersion, String buildId, String batteryLevel)
DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, String product, String productVariant, String sdkVersion, String buildId, String batteryLevel, String deviceClass, String macAddress, String simState, String simOperator)
DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, String product, String productVariant, String sdkVersion, String buildId, String batteryLevel, String deviceClass, String macAddress, String simState, String simOperator, IDevice idevice)
DeviceDescriptor(String serial, boolean isStubDevice, IDevice.DeviceState deviceState, DeviceAllocationState state, String product, String productVariant, String sdkVersion, String buildId, String batteryLevel, String deviceClass, String macAddress, String simState, String simOperator, IDevice idevice)
DeviceDescriptor(String serial, String displaySerial, boolean isStubDevice, IDevice.DeviceState deviceState, DeviceAllocationState state, TestDeviceState testDeviceState, String product, String productVariant, String sdkVersion, String buildId, String hardwareRevision, String batteryLevel, String deviceClass, String macAddress, String simState, String simOperator, boolean isTemporary, String preconfiguredIp, Integer preconfiguredDeviceNumOffset, IDevice idevice)
DeviceDescriptor(DeviceDescriptor d, DeviceAllocationState state)

Used for easy state updating in ClusterDeviceMonitor.

DeviceDescriptor(DeviceDescriptor d, String serial, String displaySerial)

Used for easy state updating of serial for placeholder devices.

DeviceDescriptor(DeviceDescriptor d, String preconfiguredIp, Integer preconfiguredDeviceNumOffset)

Public methods

String getBatteryLevel()
String getBuildId()
String getDeviceClass()
IDevice.DeviceState getDeviceState()
String getDisplaySerial()
String getHardwareRevision()
String getMacAddress()
Integer getPreconfiguredDeviceNumOffset()
String getPreconfiguredIp()
String getProduct()
String getProductVariant()
String getProperty(String name)
String getSdkVersion()
String getSerial()
String getSimOperator()
String getSimState()
DeviceAllocationState getState()
TestDeviceState getTestDeviceState()
boolean isStubDevice()
boolean isTemporary()

Returns whether or not the device will be deleted at the end of the invocation.

String toString()

Provides a description with serials, product and build id

Public constructors

DeviceDescriptor

public DeviceDescriptor ()

DeviceDescriptor

public DeviceDescriptor (String serial, 
                boolean isStubDevice, 
                DeviceAllocationState state, 
                String product, 
                String productVariant, 
                String sdkVersion, 
                String buildId, 
                String batteryLevel)

Parameters
serial String

isStubDevice boolean

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

DeviceDescriptor

public DeviceDescriptor (String serial, 
                boolean isStubDevice, 
                DeviceAllocationState state, 
                String product, 
                String productVariant, 
                String sdkVersion, 
                String buildId, 
                String batteryLevel, 
                String deviceClass, 
                String macAddress, 
                String simState, 
                String simOperator)

Parameters
serial String

isStubDevice boolean

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

deviceClass String

macAddress String

simState String

simOperator String

DeviceDescriptor

public DeviceDescriptor (String serial, 
                boolean isStubDevice, 
                DeviceAllocationState state, 
                String product, 
                String productVariant, 
                String sdkVersion, 
                String buildId, 
                String batteryLevel, 
                String deviceClass, 
                String macAddress, 
                String simState, 
                String simOperator, 
                IDevice idevice)

Parameters
serial String

isStubDevice boolean

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

deviceClass String

macAddress String

simState String

simOperator String

idevice IDevice

DeviceDescriptor

public DeviceDescriptor (String serial, 
                boolean isStubDevice, 
                IDevice.DeviceState deviceState, 
                DeviceAllocationState state, 
                String product, 
                String productVariant, 
                String sdkVersion, 
                String buildId, 
                String batteryLevel, 
                String deviceClass, 
                String macAddress, 
                String simState, 
                String simOperator, 
                IDevice idevice)

Parameters
serial String

isStubDevice boolean

deviceState IDevice.DeviceState

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

deviceClass String

macAddress String

simState String

simOperator String

idevice IDevice

DeviceDescriptor

public DeviceDescriptor (String serial, 
                String displaySerial, 
                boolean isStubDevice, 
                IDevice.DeviceState deviceState, 
                DeviceAllocationState state, 
                TestDeviceState testDeviceState, 
                String product, 
                String productVariant, 
                String sdkVersion, 
                String buildId, 
                String hardwareRevision, 
                String batteryLevel, 
                String deviceClass, 
                String macAddress, 
                String simState, 
                String simOperator, 
                boolean isTemporary, 
                String preconfiguredIp, 
                Integer preconfiguredDeviceNumOffset, 
                IDevice idevice)

Parameters
serial String

displaySerial String

isStubDevice boolean

deviceState IDevice.DeviceState

state DeviceAllocationState

testDeviceState TestDeviceState

product String

productVariant String

sdkVersion String

buildId String

hardwareRevision String

batteryLevel String

deviceClass String

macAddress String

simState String

simOperator String

isTemporary boolean

preconfiguredIp String

preconfiguredDeviceNumOffset Integer

idevice IDevice

DeviceDescriptor

public DeviceDescriptor (DeviceDescriptor d, 
                DeviceAllocationState state)

Used for easy state updating in ClusterDeviceMonitor.

Parameters
d DeviceDescriptor

state DeviceAllocationState

DeviceDescriptor

public DeviceDescriptor (DeviceDescriptor d, 
                String serial, 
                String displaySerial)

Used for easy state updating of serial for placeholder devices.

Parameters
d DeviceDescriptor

serial String

displaySerial String

DeviceDescriptor

public DeviceDescriptor (DeviceDescriptor d, 
                String preconfiguredIp, 
                Integer preconfiguredDeviceNumOffset)

Parameters
d DeviceDescriptor

preconfiguredIp String

preconfiguredDeviceNumOffset Integer

Public methods

getBatteryLevel

public String getBatteryLevel ()

Returns
String

getBuildId

public String getBuildId ()

Returns
String

getDeviceClass

public String getDeviceClass ()

Returns
String

getDeviceState

public IDevice.DeviceState getDeviceState ()

Returns
IDevice.DeviceState

getDisplaySerial

public String getDisplaySerial ()

Returns
String

getHardwareRevision

public String getHardwareRevision ()

Returns
String

getMacAddress

public String getMacAddress ()

Returns
String

getPreconfiguredDeviceNumOffset

public Integer getPreconfiguredDeviceNumOffset ()

Returns
Integer

getPreconfiguredIp

public String getPreconfiguredIp ()

Returns
String

getProduct

public String getProduct ()

Returns
String

getProductVariant

public String getProductVariant ()

Returns
String

getProperty

public String getProperty (String name)

Parameters
name String

Returns
String

getSdkVersion

public String getSdkVersion ()

Returns
String

getSerial

public String getSerial ()

Returns
String

getSimOperator

public String getSimOperator ()

Returns
String

getSimState

public String getSimState ()

Returns
String

getState

public DeviceAllocationState getState ()

Returns
DeviceAllocationState

getTestDeviceState

public TestDeviceState getTestDeviceState ()

Returns
TestDeviceState

isStubDevice

public boolean isStubDevice ()

Returns
boolean

isTemporary

public boolean isTemporary ()

Returns whether or not the device will be deleted at the end of the invocation.

Returns
boolean

toString

public String toString ()

Provides a description with serials, product and build id

Returns
String