託管測試設備工廠

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

public static final 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)

為建立的裝置啟用或不啟用快速啟動支援。

受保護的方法

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)

領域

檢查_PM_CMD

protected static final String CHECK_PM_CMD

預期錯誤

protected static final String EXPECTED_ERROR

EXPECTED_RES

protected static final String EXPECTED_RES

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

移動分配監視器

protected IDeviceMonitor mAllocationMonitor

行動裝置管理員

protected IDeviceManager mDeviceManager

mFastboot啟用

protected boolean mFastbootEnabled

公共構造函數

託管測試設備工廠

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

參數
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

公共方法

創建設備

public IManagedTestDevice createDevice (IDevice idevice)

根據傳遞給它的IDevice建立一個IManagedTestDevice

參數
idevice IDevice :將定義已建立的裝置類型

退貨
IManagedTestDevice基於 IDevice 建立的 IManagedTestDevice

建立請求設備

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

專門創建符合規範的設備

參數
idevice IDevice

options IDeviceSelection

退貨
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

如果是來自遠端連接設備的序列設備,則為設備的幫助程式。 TCP設備的串列格式是:

參數
serial String

退貨
boolean

設定快速啟動啟用

public void setFastbootEnabled (boolean enable)

為建立的裝置啟用或不啟用快速啟動支援。

參數
enable boolean :設定支援的值。

受保護的方法

建立輸出接收器

protected CollectingOutputReceiver createOutputReceiver ()

建立一個CollectingOutputReceiver

退貨
CollectingOutputReceiver

取得運行工具

protected IRunUtil getRunUtil ()

傳回預設的IRunUtil實例。

退貨
IRunUtil

是遠端環境

protected boolean isRemoteEnvironment ()

如果我們目前正在遠端環境中運行,則傳回 true。這將改變設備的行為。

退貨
boolean