託管測試設備工廠
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) 根據傳遞給它的 |
IManagedTestDevice | createRequestedDevice (IDevice idevice, IDeviceSelection options) 具體創建符合規範的設備 |
static boolean | isTcpDeviceSerial (String serial) 如果它是來自遠程連接設備的串行設備,則為設備助手。 |
void | setFastbootEnabled (boolean enable) 為創建的設備啟用或不啟用快速啟動支持。 |
受保護的方法 | |
---|---|
CollectingOutputReceiver | createOutputReceiver () 創建一個 |
IRunUtil | getRunUtil () 返回默認的 |
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
預期錯誤
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
移動設備管理器
protected IDeviceManager mDeviceManager
mFastbootEnabled
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 |
setFastbootEnabled
public void setFastbootEnabled (boolean enable)
為創建的設備啟用或不啟用快速啟動支持。
參數 | |
---|---|
enable | boolean : 值設置支持。 |
受保護的方法
創建輸出接收器
protected CollectingOutputReceiver createOutputReceiver ()
創建一個CollectingOutputReceiver
。
退貨 | |
---|---|
CollectingOutputReceiver |
是遠程環境
protected boolean isRemoteEnvironment ()
如果我們當前在遠程環境中運行,則返回 true。這將改變設備行為。
退貨 | |
---|---|
boolean |