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
|
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)
根據傳遞給它的 |
IManagedTestDevice
|
createRequestedDevice(IDevice idevice, IDeviceSelection options)
具體建立符合規格的裝置 |
static
boolean
|
isTcpDeviceSerial(String serial)
如果裝置是從遠端連線裝置的序號,則為裝置的輔助程式。 |
void
|
setFastbootEnabled(boolean enable)
為建立的裝置啟用或停用 Fastboot 支援。 |
受保護的方法 | |
---|---|
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
EXPECTED_ERROR
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
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
建立 IManagedTestDevice
。
參數 | |
---|---|
idevice |
IDevice :定義建立的裝置類型 |
傳回 | |
---|---|
IManagedTestDevice |
根據 IDevice 建立的 IManagedTestDevice |
createRequestedDevice
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)
為建立的裝置啟用或停用 Fastboot 支援。
參數 | |
---|---|
enable |
boolean :設定支援的值。 |
受保護的方法
createOutputReceiver
protected CollectingOutputReceiver createOutputReceiver ()
傳回 | |
---|---|
CollectingOutputReceiver |
isRemoteEnvironment
protected boolean isRemoteEnvironment ()
如果目前是在遠端環境中執行,則傳回 true。這麼做會改變裝置的行為。
傳回 | |
---|---|
boolean |