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)

指定されたシリアル番号のデバイスのみを照合する IDeviceSelection を作成するヘルパー ファクトリ メソッド

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

メタデータから一時的なプレースホルダを作成します。

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

getExcludeSerials

public  getExcludeSerials ()

シリアル番号の除外リストのコピーを取得します

戻り値
シリアル番号の ERROR(/Collection)

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

リクエストされた最大バッテリー残量を取得します

戻り値
Integer

getMaxBatteryTemperature

public Integer getMaxBatteryTemperature ()

リクエストされた最大バッテリー残量を取得します

戻り値
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

リクエストされた最小バッテリー残量を取得します

戻り値
Integer

getNoMatchReason

public  getNoMatchReason ()

デバイスが一致しなかった理由を返します。

戻り値
シリアル番号と割り当てられなかった理由の Map

getProductTypes

public  getProductTypes ()

商品カテゴリのリストのコピーを取得します

戻り値
ERROR(/Collection) 個のアイテムタイプ

getProperties

public  getProperties ()

プロパティ リストのマップを返します

戻り値
デバイス プロパティ名と値の ERROR(/Map)

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

電池残量が不明なデバイスで電池チェックが必要かどうかを取得します

戻り値
boolean

getRequireBatteryTemperatureCheck

public boolean getRequireBatteryTemperatureCheck ()

バッテリー温度が不明なデバイスでバッテリー温度の確認が必要かどうかを取得します

戻り値
boolean

getSerials

public  getSerials (IDevice device)

シリアル番号のコピーを取得する

パラメータ
device IDevice: 選択対象となるデバイスを表す IDevice

戻り値
シリアル番号の ERROR(/Collection)

getSerials

public  getSerials ()

リクエストされたシリアルのリストを返します。

戻り値

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

shouldCreateTemporarilyPlaceholder

public boolean shouldCreateTemporarilyPlaceholder ()

メタデータから一時的なプレースホルダを作成します。

戻り値
boolean

stubEmulatorRequested

public boolean stubEmulatorRequested ()

戻り値
boolean