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)
设备帮助程序(如果它是来自远程连接设备的序列号)。 |
常量
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
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 |
远程环境
protected boolean isRemoteEnvironment ()
如果当前是在远程环境中运行,则返回 true。这会改变设备 行为
返回 | |
---|---|
boolean |
isTcpDeviceSerial
protected boolean isTcpDeviceSerial (String serial)
设备帮助程序(如果它是来自远程连接设备的序列号)。
TCP 设备的串行格式为
参数 | |
---|---|
serial |
String |
返回 | |
---|---|
boolean |