託管測試設備工廠
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 () 建立一個 |
IRunUtil | getRunUtil () 傳回預設的 |
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)
領域
檢查_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
mFastboot啟用
protected boolean mFastbootEnabled
公共構造函數
託管測試設備工廠
public ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)
參數 | |
---|---|
fastbootEnabled | boolean |
deviceManager | IDeviceManager |
allocationMonitor | IDeviceMonitor |
公共方法
創建設備
public IManagedTestDevice createDevice (IDevice idevice)
參數 | |
---|---|
idevice | IDevice |
退貨 | |
---|---|
IManagedTestDevice |
設定快速啟動啟用
public void setFastbootEnabled (boolean enable)
參數 | |
---|---|
enable | boolean |
受保護的方法
檢查框架支持
protected boolean checkFrameworkSupport (IDevice idevice)
如果設備有框架支持,則傳回 true 的幫助程式。
參數 | |
---|---|
idevice | IDevice |
退貨 | |
---|---|
boolean |
建立輸出接收器
protected CollectingOutputReceiver createOutputReceiver ()
建立一個CollectingOutputReceiver
。
退貨 | |
---|---|
CollectingOutputReceiver |
是遠端環境
protected boolean isRemoteEnvironment ()
如果我們目前正在遠端環境中運行,則傳回 true。這將改變設備的行為。
退貨 | |
---|---|
boolean |
isTcpDeviceSerial
protected boolean isTcpDeviceSerial (String serial)
如果是來自遠端連接設備的序列設備,則為設備的幫助程式。 TCP設備的串列格式是
參數 | |
---|---|
serial | String |
退貨 | |
---|---|
boolean |