デバイス選択オプション
public class DeviceSelectionOptions
extends Object
implements IDeviceSelection
java.lang.オブジェクト | |
↳ | com.android.tradefed.device.DeviceSelectionOptions |
デバイス選択基準のコンテナ。
まとめ
パブリックコンストラクター | |
---|---|
DeviceSelectionOptions () |
パブリックメソッド | |
---|---|
void | addExcludeSerial (String serialNumber) シリアル番号を除外リストに追加します。 |
void | addProductType (String productType) デバイス選択オプションに製品タイプを追加します。 |
void | addProperty (String propertyKey, String propValue) デバイス選択オプションにプロパティ基準を追加する |
void | addSerial (String serialNumber) デバイス選択オプションにシリアル番号を追加します。 |
static IDeviceSelection | createForSerial (String serial) 指定されたシリアルを持つデバイスのみに一致する |
boolean | deviceRequested () |
boolean | emulatorRequested () |
String | fetchEnvironmentVariable (String name) 環境変数を取得するために使用されるヘルパー関数。 |
boolean | gceDeviceRequested () |
IDeviceSelection.BaseDeviceType | getBaseDeviceTypeRequested () 使用するデバイスの種類を返します。 |
Integer | getBatteryLevel (IDevice device) 指定されたデバイスのバッテリーレベルを取得します |
String | getDeviceProductType (IDevice device) 指定されたデバイスの製品タイプを取得します |
String | getDeviceProductVariant (IDevice device) 指定されたデバイスの製品バリアントを取得します |
DeviceSelectionOptions.DeviceRequestedType | getDeviceTypeRequested () |
getExcludeSerials () シリアル番号除外リストのコピーを取得します | |
Integer | getMaxBatteryLevel () 要求された最大バッテリーレベルを取得します |
Integer | getMaxBatteryTemperature () 要求された最大バッテリーレベルを取得します |
Integer | getMinBatteryLevel () 要求された最小バッテリーレベルを取得します |
getNoMatchReason () デバイスが一致しなかった理由を返します。 | |
getProductTypes () 製品タイプリストのコピーを取得します | |
getProperties () プロパティリストのマップを返します。 | |
boolean | getRequireBatteryCheck () バッテリーレベルが不明なデバイスにバッテリーチェックが必要かどうかを取得します |
boolean | getRequireBatteryTemperatureCheck () バッテリー温度が不明なデバイスにバッテリー温度チェックが必要かどうかを取得します |
getSerials (IDevice device) シリアル番号のコピーを取得します | |
getSerials () 要求されたシリアルのリストを返します。 | |
boolean | localVirtualDeviceRequested () |
boolean | matches (IDevice device) |
boolean | nullDeviceRequested () |
boolean | remoteDeviceRequested () |
void | setBaseDeviceTypeRequested ( IDeviceSelection.BaseDeviceType type) 使用するデバイスの種類を設定します。 |
void | setDeviceRequested (boolean deviceRequested) エミュレータ要求フラグを設定します |
void | setDeviceTypeRequested ( DeviceSelectionOptions.DeviceRequestedType requestedType) |
void | setEmulatorRequested (boolean emulatorRequested) エミュレータ要求フラグを設定します |
void | setGceDeviceRequested (boolean gceDeviceRequested) |
void | setMaxBatteryLevel (Integer maxBattery) 最大バッテリーレベルを設定します |
void | setMaxBatteryTemperature (Integer maxBatteryTemperature) 最大バッテリーレベルを設定します |
void | setMinBatteryLevel (Integer minBattery) 最小バッテリーレベルを設定します |
void | setNullDeviceRequested (boolean nullDeviceRequested) null デバイス要求フラグを設定します。 |
void | setRequireBatteryCheck (boolean requireCheck) バッテリーレベルが不明なデバイスに対してバッテリーチェックが必要かどうかを設定します |
void | setRequireBatteryTemperatureCheck (boolean requireCheckTemprature) バッテリー温度が不明なデバイスに対してバッテリー温度チェックが必要かどうかを設定します |
void | setSerial (String... serialNumber) 既存の値を置き換えて、シリアル番号包含リストを設定します。 |
void | setStubEmulatorRequested (boolean stubEmulatorRequested) スタブエミュレータ要求フラグを設定します。 |
void | setTcpDeviceRequested (boolean tcpDeviceRequested) TCPデバイス要求フラグを設定します。 |
boolean | stubEmulatorRequested () |
boolean | tcpDeviceRequested ()
|
パブリックコンストラクター
デバイス選択オプション
public DeviceSelectionOptions ()
パブリックメソッド
addExcludeSerial
public void addExcludeSerial (String serialNumber)
シリアル番号を除外リストに追加します。
製品タイプを追加
public void addProductType (String productType)
デバイス選択オプションに製品タイプを追加します。
addProperty
public void addProperty (String propertyKey, String propValue)
デバイス選択オプションにプロパティ基準を追加する
パラメーター | |
---|---|
propertyKey | String |
propValue | String |
追加シリアル
public void addSerial (String serialNumber)
デバイス選択オプションにシリアル番号を追加します。
シリアル用に作成
public static IDeviceSelection createForSerial (String serial)
指定されたシリアルを持つデバイスのみに一致するIDeviceSelection
を作成するヘルパー ファクトリ メソッド
パラメーター | |
---|---|
serial | String |
戻り値 | |
---|---|
IDeviceSelection |
デバイスが要求されました
public boolean deviceRequested ()
戻り値 | |
---|---|
boolean |
エミュレータが要求されました
public boolean emulatorRequested ()
戻り値 | |
---|---|
boolean |
fetch環境変数
public String fetchEnvironmentVariable (String name)
環境変数を取得するために使用されるヘルパー関数。これは本質的にSystem.getenv(String)
のラッパーです。これは単体テストの目的で行われます。
パラメーター | |
---|---|
name | String : 取得する環境変数。 |
戻り値 | |
---|---|
String | 環境変数のString 値、または使用できない場合は null。 |
gceDeviceRequested
public boolean gceDeviceRequested ()
戻り値 | |
---|---|
boolean |
getBaseDeviceTypeRequested
public IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()
使用するデバイスの種類を返します。
戻り値 | |
---|---|
IDeviceSelection.BaseDeviceType |
バッテリーレベルの取得
public Integer getBatteryLevel (IDevice device)
指定されたデバイスのバッテリーレベルを取得します
パラメーター | |
---|---|
device | IDevice : IDevice |
戻り値 | |
---|---|
Integer | デバイスのバッテリーレベル、または不明な場合はnull |
getDeviceProductType
public String getDeviceProductType (IDevice device)
指定されたデバイスの製品タイプを取得します
パラメーター | |
---|---|
device | IDevice : IDevice |
戻り値 | |
---|---|
String | デバイスの製品タイプ、または不明な場合はnull |
getDeviceProductVariant
public String getDeviceProductVariant (IDevice device)
指定されたデバイスの製品バリアントを取得します
パラメーター | |
---|---|
device | IDevice : IDevice |
戻り値 | |
---|---|
String | デバイスの製品バリアント、または不明な場合はnull |
getDeviceTypeRequested
public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()
戻り値 | |
---|---|
DeviceSelectionOptions.DeviceRequestedType |
getMaxBatteryLevel
public Integer getMaxBatteryLevel ()
要求された最大バッテリーレベルを取得します
戻り値 | |
---|---|
Integer |
getMaxBatteryTemperature
public Integer getMaxBatteryTemperature ()
要求された最大バッテリーレベルを取得します
戻り値 | |
---|---|
Integer |
最小バッテリーレベルの取得
public Integer getMinBatteryLevel ()
要求された最小バッテリーレベルを取得します
戻り値 | |
---|---|
Integer |
getNoMatchReason
publicgetNoMatchReason ()
デバイスが一致しなかった理由を返します。
戻り値 | |
---|---|
シリアル番号と割り当てられなかった理由のマップ |
getRequireBatteryCheck
public boolean getRequireBatteryCheck ()
バッテリーレベルが不明なデバイスにバッテリーチェックが必要かどうかを取得します
戻り値 | |
---|---|
boolean |
getRequireBatteryTemperatureCheck
public boolean getRequireBatteryTemperatureCheck ()
バッテリー温度が不明なデバイスにバッテリー温度チェックが必要かどうかを取得します
戻り値 | |
---|---|
boolean |
シリアルを取得する
publicgetSerials (IDevice device)
シリアル番号のコピーを取得します
パラメーター | |
---|---|
device | IDevice : 選択の対象となるデバイスを表すIDevice 。 |
戻り値 | |
---|---|
シリアル番号のERROR(/Collection) |
シリアルを取得する
publicgetSerials ()
要求されたシリアルのリストを返します。
戻り値 | |
---|---|
localVirtualDeviceRequested
public boolean localVirtualDeviceRequested ()
戻り値 | |
---|---|
boolean |
マッチ
public boolean matches (IDevice device)
パラメーター | |
---|---|
device | IDevice |
戻り値 | |
---|---|
boolean | 指定されたIDevice 指定されたオプションと一致する場合はtrue 。それ以外の場合はfalse |
nullDeviceRequested
public boolean nullDeviceRequested ()
戻り値 | |
---|---|
boolean |
リモートデバイスが要求されました
public boolean remoteDeviceRequested ()
戻り値 | |
---|---|
boolean |
setBaseDeviceTypeRequested
public void setBaseDeviceTypeRequested (IDeviceSelection.BaseDeviceType type)
使用するデバイスの種類を設定します。
パラメーター | |
---|---|
type | IDeviceSelection.BaseDeviceType |
setDeviceRequested
public void setDeviceRequested (boolean deviceRequested)
エミュレータ要求フラグを設定します
パラメーター | |
---|---|
deviceRequested | boolean |
setDeviceTypeRequested
public void setDeviceTypeRequested (DeviceSelectionOptions.DeviceRequestedType requestedType)
パラメーター | |
---|---|
requestedType | DeviceSelectionOptions.DeviceRequestedType |
setEmulatorRequested
public void setEmulatorRequested (boolean emulatorRequested)
エミュレータ要求フラグを設定します
パラメーター | |
---|---|
emulatorRequested | boolean |
setGceDeviceRequested
public void setGceDeviceRequested (boolean gceDeviceRequested)
パラメーター | |
---|---|
gceDeviceRequested | boolean |
setMaxBatteryLevel
public void setMaxBatteryLevel (Integer maxBattery)
最大バッテリーレベルを設定します
パラメーター | |
---|---|
maxBattery | Integer |
setMaxBatteryTemperature
public void setMaxBatteryTemperature (Integer maxBatteryTemperature)
最大バッテリーレベルを設定します
パラメーター | |
---|---|
maxBatteryTemperature | Integer |
最小バッテリーレベルの設定
public void setMinBatteryLevel (Integer minBattery)
最小バッテリーレベルを設定します
パラメーター | |
---|---|
minBattery | Integer |
setNullDeviceRequested
public void setNullDeviceRequested (boolean nullDeviceRequested)
null デバイス要求フラグを設定します。
パラメーター | |
---|---|
nullDeviceRequested | boolean |
setRequireBatteryCheck
public void setRequireBatteryCheck (boolean requireCheck)
バッテリーレベルが不明なデバイスに対してバッテリーチェックが必要かどうかを設定します
パラメーター | |
---|---|
requireCheck | boolean |
setRequireBatteryTemperatureCheck
public void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)
バッテリー温度が不明なデバイスに対してバッテリー温度チェックが必要かどうかを設定します
パラメーター | |
---|---|
requireCheckTemprature | boolean |
セットシリアル
public void setSerial (String... serialNumber)
既存の値を置き換えて、シリアル番号包含リストを設定します。
パラメーター | |
---|---|
serialNumber | String |
setStubEmulatorRequested
public void setStubEmulatorRequested (boolean stubEmulatorRequested)
スタブエミュレータ要求フラグを設定します。
パラメーター | |
---|---|
stubEmulatorRequested | boolean |
setTcpDeviceRequested
public void setTcpDeviceRequested (boolean tcpDeviceRequested)
TCPデバイス要求フラグを設定します。
パラメーター | |
---|---|
tcpDeviceRequested | boolean |
スタブエミュレータリクエスト済み
public boolean stubEmulatorRequested ()
戻り値 | |
---|---|
boolean |
tcpDeviceRequested
public boolean tcpDeviceRequested ()
戻り値 | |
---|---|
boolean |