DeviceSelectionOptions
public
class
DeviceSelectionOptions
extends Object
implements
IDeviceSelection
java.lang.Object | |
↳ | 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)
スタブ エミュレータの要求フラグを設定します。 |
boolean
|
stubEmulatorRequested()
|
パブリック コンストラクタ
DeviceSelectionOptions
public DeviceSelectionOptions ()
パブリック メソッド
addExcludeSerial
public void addExcludeSerial (String serialNumber)
除外リストにシリアル番号を追加。
addProductType
public void addProductType (String productType)
デバイス選択オプションに商品カテゴリを追加しました。
addProperty
public void addProperty (String propertyKey, String propValue)
デバイス選択オプションにプロパティ条件を追加する
パラメータ | |
---|---|
propertyKey |
String |
propValue |
String |
addSerial
public void addSerial (String serialNumber)
デバイス選択オプションにシリアル番号を追加しました。
createForSerial
public static IDeviceSelection createForSerial (String serial)
指定されたシリアル番号を持つデバイスのみに一致する IDeviceSelection
を作成するヘルパー ファクトリ メソッド
パラメータ | |
---|---|
serial |
String |
戻り値 | |
---|---|
IDeviceSelection |
deviceRequested
public boolean deviceRequested ()
戻り値 | |
---|---|
boolean |
emulatorRequested
public boolean emulatorRequested ()
戻り値 | |
---|---|
boolean |
fetchEnvironmentVariable
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 |
getBatteryLevel
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 |
getMinBatteryLevel
public Integer getMinBatteryLevel ()
リクエストされた最小バッテリー残量を取得する
戻り値 | |
---|---|
Integer |
getNoMatchReason
publicgetNoMatchReason ()
デバイスが一致しなかった理由を返します。
戻り値 | |
---|---|
|
シリアル番号と、割り当てられなかった理由のマップ |
getRequireBatteryCheck
public boolean getRequireBatteryCheck ()
電池残量が不明なデバイスでバッテリー チェックが必要かどうかを取得する
戻り値 | |
---|---|
boolean |
getRequireBatteryTemperatureCheck
public boolean getRequireBatteryTemperatureCheck ()
バッテリー温度が不明なデバイスでバッテリー温度チェックが必要かどうかを取得します。
戻り値 | |
---|---|
boolean |
getSerials
publicgetSerials (IDevice device)
シリアル番号のコピーを取得する
パラメータ | |
---|---|
device |
IDevice : 選択対象のデバイスを表す IDevice 。 |
戻り値 | |
---|---|
|
シリアル番号の ERROR(/Collection) |
getSerials
publicgetSerials ()
リクエストされた連続番組のリストを返します。
戻り値 | |
---|---|
|
localVirtualDeviceRequested
public boolean localVirtualDeviceRequested ()
戻り値 | |
---|---|
boolean |
一致
public boolean matches (IDevice device)
パラメータ | |
---|---|
device |
IDevice |
戻り値 | |
---|---|
boolean |
指定された IDevice が指定されたオプションと一致する場合は true 。それ以外の場合は false |
nullDeviceRequested
public boolean nullDeviceRequested ()
戻り値 | |
---|---|
boolean |
remoteDeviceRequested
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 |
setMinBatteryLevel
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 |
setSerial
public void setSerial (String... serialNumber)
既存の値を置き換えて、シリアル番号の包含リストを設定します。
パラメータ | |
---|---|
serialNumber |
String |
setStubEmulatorRequested
public void setStubEmulatorRequested (boolean stubEmulatorRequested)
スタブ エミュレータがリクエストされたフラグを設定する
パラメータ | |
---|---|
stubEmulatorRequested |
boolean |
stubEmulatorRequested
public boolean stubEmulatorRequested ()
戻り値 | |
---|---|
boolean |