设备描述符

public class DeviceDescriptor
extends Object

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


包含描述被测设备信息的类。

摘要

公共构造函数

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)

用于在 ClusterDeviceMonitor 中轻松更新状态。

DeviceDescriptor(DeviceDescriptor d, String serial, String displaySerial)

用于轻松更新占位符设备的序列状态。

DeviceDescriptor(DeviceDescriptor d, String preconfiguredIp, Integer preconfiguredDeviceNumOffset)

公共方法

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

返回是否在调用结束时删除设备。

String toString()

提供关于序列号、产品和 build ID 的说明

公共构造函数

设备描述符

public DeviceDescriptor ()

设备描述符

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

参数
serial String

isStubDevice boolean

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

设备描述符

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)

参数
serial String

isStubDevice boolean

state DeviceAllocationState

product String

productVariant String

sdkVersion String

buildId String

batteryLevel String

deviceClass String

macAddress String

simState String

simOperator String

设备描述符

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)

参数
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

设备描述符

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)

参数
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

设备描述符

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)

参数
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

设备描述符

public DeviceDescriptor (DeviceDescriptor d, 
                DeviceAllocationState state)

用于在 ClusterDeviceMonitor 中轻松更新状态。

参数
d DeviceDescriptor

state DeviceAllocationState

设备描述符

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

用于轻松更新占位符设备的序列状态。

参数
d DeviceDescriptor

serial String

displaySerial String

设备描述符

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

参数
d DeviceDescriptor

preconfiguredIp String

preconfiguredDeviceNumOffset Integer

公共方法

getBatteryLevel

public String getBatteryLevel ()

返回
String

getBuildId

public String getBuildId ()

返回
String

getDeviceClass

public String getDeviceClass ()

返回
String

getDeviceState

public IDevice.DeviceState getDeviceState ()

返回
IDevice.DeviceState

getDisplaySerial

public String getDisplaySerial ()

返回
String

getHardwareRevision

public String getHardwareRevision ()

返回
String

getMacAddress

public String getMacAddress ()

返回
String

getPreconfigurationDeviceNumOffset

public Integer getPreconfiguredDeviceNumOffset ()

返回
Integer

getPreconfigurationIp

public String getPreconfiguredIp ()

返回
String

获取产品

public String getProduct ()

返回
String

getProductVariant

public String getProductVariant ()

返回
String

getProperty

public String getProperty (String name)

参数
name String

返回
String

getSdkVersion

public String getSdkVersion ()

返回
String

getSerial

public String getSerial ()

返回
String

getSimOperator

public String getSimOperator ()

返回
String

getSimState

public String getSimState ()

返回
String

getState

public DeviceAllocationState getState ()

返回
DeviceAllocationState

getTestDeviceState

public TestDeviceState getTestDeviceState ()

返回
TestDeviceState

isStubDevice

public boolean isStubDevice ()

返回
boolean

是临时

public boolean isTemporary ()

返回是否在调用结束时删除设备。

返回
boolean

toString

public String toString ()

提供关于序列号、产品和 build ID 的说明

返回
String