ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactoryます

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


Tf で監視できるさまざまな種類のデバイスを作成するためのファクトリ

まとめ

定数

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

田畑

protected static final String CHECK_PM_CMD

protected static final String EXPECTED_ERROR

protected static final String EXPECTED_RES

public static final String IPADDRESS_PATTERN

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 サポートを有効にするかどうか。

保護されたメソッド

boolean checkFrameworkSupport (IDevice idevice)

デバイスがフレームワークをサポートしている場合に true を返すヘルパー。

CollectingOutputReceiver createOutputReceiver ()

CollectingOutputReceiverを作成します。

IRunUtil getRunUtil ()

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

boolean isRemoteEnvironment ()

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

定数

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)

田畑

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

EXPECTED_RES

protected static final String EXPECTED_RES

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

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 : サポートを設定する値。

保護されたメソッド

checkFrameworkSupport

protected boolean checkFrameworkSupport (IDevice idevice)

デバイスがフレームワークをサポートしている場合に true を返すヘルパー。

パラメーター
idevice IDevice

戻り値
boolean

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

CollectingOutputReceiverを作成します。

戻り値
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

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

戻り値
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

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

戻り値
boolean