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()
|
IRunUtil
|
getRunUtil()
傳回預設的 |
boolean
|
isRemoteEnvironment()
如果目前正在遠端環境中執行,則傳回 true。 |
boolean
|
isTcpDeviceSerial(String serial)
裝置為遠端連線裝置提供的序號時,將能運用裝置輔助功能。 |
常數
框架 WORK_CHECK_MAX_RETRY
protected static final int FRAMEWORK_CHECK_MAX_RETRY
常數值: 3 分 (0x00000003)。
框架 WORK_CHECK_SLEEP_MS
protected static final long FRAMEWORK_CHECK_SLEEP_MS
常數值: 500 人 (0x00000000000001f4)
欄位
CHECK_PM_CMD
protected static final String CHECK_PM_CMD
EXPECTED_錯誤
protected static final String EXPECTED_ERROR
預期
protected static final String EXPECTED_RES
IPADDRESS_PATTERN
public static final String IPADDRESS_PATTERN
mFastbootEnabled
protected boolean mFastbootEnabled
公用建構函式
ManagedTestDeviceFactory
public ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)
參數 | |
---|---|
fastbootEnabled |
boolean |
deviceManager |
IDeviceManager |
allocationMonitor |
IDeviceMonitor |
公用方法
建立裝置
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 |
isRemoteEnvironment
protected boolean isRemoteEnvironment ()
如果目前正在遠端環境中執行,則傳回 true。這會變更裝置 行為
傳回 | |
---|---|
boolean |
isTcpDeviceSerial
protected boolean isTcpDeviceSerial (String serial)
裝置為遠端連線裝置提供的序號時,將能運用裝置輔助功能。
tcp 裝置序列格式為:
參數 | |
---|---|
serial |
String |
傳回 | |
---|---|
boolean |