DeviceSelectionOptions

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

java.lang.Object
com.android.tradefed.device.DeviceSelectionOptions


デバイス選択基準のコンテナ。

概要

ネストされたクラス

enum DeviceSelectionOptions.DeviceRequestedType

サポートされているさまざまなタイプのプレースホルダーデバイス。

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

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

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

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

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

エミュレーターリクエスト

public boolean emulatorRequested ()

戻り値
boolean

fetchEnvironmentVariable

public String fetchEnvironmentVariable (String name)

環境変数をフェッチするために使用されるヘルパー関数。それは本質的にラッパーであるSystem.getenv(String)これは、ユニットテストの目的のために行われます。

パラメーター
name String :フェッチする環境変数。

戻り値
String String環境変数の値またはnullの場合は使用できません。

gceDeviceRequested

public boolean gceDeviceRequested ()

戻り値
boolean

getBatteryLevel

public Integer getBatteryLevel (IDevice device)

指定されたデバイスのバッテリーレベルを取得します

パラメーター
device IDeviceIDevice

戻り値
Integerデバイスのバッテリーレベルまたはnull場合は不明

getDeviceProductType

public String getDeviceProductType (IDevice device)

指定されたデバイスの製品タイプを取得します

パラメーター
device IDeviceIDevice

戻り値
Stringデバイスの製品タイプまたはnull場合は不明

getDeviceProductVariant

public String getDeviceProductVariant (IDevice device)

指定されたデバイスの製品バリアントを取得します

パラメーター
device IDeviceIDevice

戻り値
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 IDeviceIDevice選択のために考慮デバイスを表します。

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

getSerials

public  getSerials ()

要求された雑誌のリストを返します。

戻り値

localVirtualDeviceRequested

public boolean localVirtualDeviceRequested ()

戻り値
boolean

一致する

public boolean matches (IDevice device)

パラメーター
device IDevice

戻り値
boolean true与えられた場合IDevice提供されるオプションの一致です。 falseそう

nullDeviceRequested

public boolean nullDeviceRequested ()

戻り値
boolean

remoteDeviceRequested

public boolean remoteDeviceRequested ()

戻り値
boolean

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

setTcpDeviceRequested

public void setTcpDeviceRequested (boolean tcpDeviceRequested)

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

パラメーター
tcpDeviceRequested boolean

スタブEmulatorRequested

public boolean stubEmulatorRequested ()

戻り値
boolean

tcpDeviceRequested

public boolean tcpDeviceRequested ()

戻り値
boolean