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)

void setFastbootEnabled(boolean enable)

受保護的方法

boolean checkFrameworkSupport(IDevice idevice)

如果裝置支援架構,則會傳回 true 的輔助程式。

CollectingOutputReceiver createOutputReceiver()

建立 CollectingOutputReceiver

IRunUtil getRunUtil()

傳回預設 IRunUtil 例項。

boolean isRemoteEnvironment()

如果目前是在遠端環境中執行,則傳回 true。

boolean isTcpDeviceSerial(String serial)

如果裝置是從遠端連線裝置的序號,則為裝置的輔助程式。

常數

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 IDevice

傳回
IManagedTestDevice

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

參數
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

isTcpDeviceSerial

protected boolean isTcpDeviceSerial (String serial)

如果是從遠端連線裝置傳送的序號,則是裝置的輔助程式。TCP 裝置的序號格式為 :

參數
serial String

傳回
boolean