ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

java.lang.Object
   ↳ com.android.tradefed.device.ManagedTestDeviceFactory


Tf でモニタリングできるさまざまな種類のデバイスを作成するファクトリ

概要

定数

String CHECK_PM_CMD

String EXPECTED_ERROR

String EXPECTED_RES

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

String IPADDRESS_PATTERN

String NOTIFY_AS_NATIVE

フィールド

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

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

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

パブリック メソッド

IManagedTestDevice createDevice(IDevice idevice)

渡された IDevice に基づいて IManagedTestDevice を作成します。

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

仕様に一致するデバイスを明示的に作成します。

static boolean isTcpDeviceSerial(String serial)

リモート接続されたデバイスのシリアル番号の場合、デバイスへのヘルパー。

void setFastbootEnabled(boolean enable)

作成されたデバイスの fastboot サポートを有効にするかどうか。

保護されたメソッド

CollectingOutputReceiver createOutputReceiver()

CollectingOutputReceiver を作成します。

IRunUtil getRunUtil()

デフォルトの IRunUtil インスタンスを返します。

boolean isRemoteEnvironment()

現在リモート環境で実行中の場合は true を返します。

定数

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

定数値: "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

定数値: 「該当するファイルまたはディレクトリがありません」

EXPECTED_RES

protected static final String EXPECTED_RES

定数値: "/system/bin/pm"

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

定数値: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

定数値: 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

定数値: "((^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]))|(localhost)){1}"

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

定数値: "NOTIFY_AS_NATIVE"

フィールド

mAllocationMonitor

protected IDeviceMonitor mAllocationMonitor

mDeviceManager

protected IDeviceManager mDeviceManager

mFastbootEnabled

protected boolean mFastbootEnabled

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

ManagedTestDeviceFactory

public ManagedTestDeviceFactory (boolean fastbootEnabled, 
                IDeviceManager deviceManager, 
                IDeviceMonitor allocationMonitor)

パラメータ
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

パブリック メソッド

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

渡された IDevice に基づいて IManagedTestDevice を作成します。

パラメータ
idevice IDevice: 作成されるデバイスのタイプを定義します。

戻り値
IManagedTestDevice IDevice に基づいて作成された IManagedTestDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

仕様に一致するデバイスを具体的に作成する

パラメータ
idevice IDevice

options IDeviceSelection

戻り値
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

リモート接続されたデバイスのシリアル番号の場合、デバイスへのヘルパー。tcp デバイスのシリアル形式は : です。

パラメータ
serial String

戻り値
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

作成されたデバイスの fastboot サポートを有効にするかどうか。

パラメータ
enable boolean: サポートを設定する値。

保護されたメソッド

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

CollectingOutputReceiver を作成します。

戻り値
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

デフォルトの IRunUtil インスタンスを返します。

戻り値
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

現在リモート環境で実行中の場合は true を返します。これにより、デバイスの動作が変更されます。

戻り値
boolean