裝置描述符
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 的描述