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 |