デバイス選択オプション

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)

スタブ エミュレーター要求フラグを設定します

void setTcpDeviceRequested (boolean tcpDeviceRequested)

tcp デバイス要求フラグを設定します

boolean stubEmulatorRequested ()

boolean tcpDeviceRequested ()

パブリック コンストラクター

デバイス選択オプション

public DeviceSelectionOptions ()

公開メソッド

addExcludeSerial

public void addExcludeSerial (String serialNumber)

シリアル番号を除外リストに追加します。

addProductType

public void addProductType (String productType)

製品タイプをデバイス選択オプションに追加します。

プロパティを追加

public void addProperty (String propertyKey, 
                String propValue)

デバイス選択オプションにプロパティ条件を追加します

パラメーター
propertyKey String

propValue String

addシリアル

public void addSerial (String serialNumber)

デバイス選択オプションにシリアル番号を追加します。

createForSerial

public static IDeviceSelection createForSerial (String serial)

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

パラメーター
serial String

戻り値
IDeviceSelection

デバイスが要求されました

public boolean deviceRequested ()

戻り値
boolean

エミュレータが要求されました

public boolean emulatorRequested ()

戻り値
boolean

フェッチ環境変数

public String fetchEnvironmentVariable (String name)

環境変数のフェッチに使用されるヘルパー関数。これは基本的にERROR(/System#getenv(String))のラッパーです。これは単体テストの目的で行われます。

パラメーター
name String : 取得する環境変数。

戻り値
String環境変数のERROR(/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 ()

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

戻り値
割り当てられなかった理由へのシリアル番号のマップ

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

セットシリアル

public void setSerial (String... serialNumber)

シリアル番号の包含リストを設定し、既存の値を置き換えます。

パラメーター
serialNumber String

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

スタブ エミュレーター要求フラグを設定します

パラメーター
stubEmulatorRequested boolean

setTcpDeviceRequested

public void setTcpDeviceRequested (boolean tcpDeviceRequested)

tcp デバイス要求フラグを設定します

パラメーター
tcpDeviceRequested boolean

stubEmulatorRequested

public boolean stubEmulatorRequested ()

戻り値
boolean

tcpDeviceRequested

public boolean tcpDeviceRequested ()

戻り値
boolean