设备描述符
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) |
公共构造函数
设备描述符
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,
String serial,
String displaySerial)
用于轻松更新占位符设备的串行状态。
参数 |
---|
d | DeviceDescriptor |
serial | String |
displaySerial | String |
设备描述符
public DeviceDescriptor (DeviceDescriptor d,
String preconfiguredIp,
Integer preconfiguredDeviceNumOffset)
参数 |
---|
d | DeviceDescriptor |
preconfiguredIp | String |
preconfiguredDeviceNumOffset | Integer |
公共方法
获取电池电量
public String getBatteryLevel ()
获取构建ID
public String getBuildId ()
获取设备类
public String getDeviceClass ()
获取设备状态
public IDevice.DeviceState getDeviceState ()
获取显示序列号
public String getDisplaySerial ()
获取硬件修订版
public String getHardwareRevision ()
获取Mac地址
public String getMacAddress ()
public Integer getPreconfiguredDeviceNumOffset ()
public String getPreconfiguredIp ()
获取产品
public String getProduct ()
获取产品变体
public String getProductVariant ()
获取属性
public String getProperty (String name)
获取SDK版本
public String getSdkVersion ()
获取序列号
public String getSerial ()
获取Sim算子
public String getSimOperator ()
获取模拟状态
public String getSimState ()
是存根设备
public boolean isStubDevice ()
是临时的
public boolean isTemporary ()
返回调用结束时是否删除设备。
到字符串
public String toString ()
提供包含序列号、产品和构建 ID 的描述