托管测试设备工厂
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) 为创建的设备启用或不启用快速启动支持。 |
受保护的方法 | |
---|---|
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)
领域
检查_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
NOTIFY_AS_NATIVE
public static final String NOTIFY_AS_NATIVE
移动分配监视器
protected IDeviceMonitor mAllocationMonitor
移动设备管理器
protected IDeviceManager mDeviceManager
mFastboot启用
protected boolean mFastbootEnabled
公共构造函数
托管测试设备工厂
public ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)
参数 | |
---|---|
fastbootEnabled | boolean |
deviceManager | IDeviceManager |
allocationMonitor | IDeviceMonitor |
公共方法
创建设备
public IManagedTestDevice createDevice (IDevice idevice)
根据传递给它的IDevice
创建一个IManagedTestDevice
。
参数 | |
---|---|
idevice | IDevice :将定义创建的设备类型 |
退货 | |
---|---|
IManagedTestDevice | 基于 IDevice 创建的 IManagedTestDevice |
创建请求设备
public IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)
专门创建符合规范的设备
参数 | |
---|---|
idevice | IDevice |
options | IDeviceSelection |
退货 | |
---|---|
IManagedTestDevice |
isTcpDeviceSerial
public static boolean isTcpDeviceSerial (String serial)
如果是来自远程连接设备的串行设备,则为设备的帮助程序。 TCP设备的串行格式是
参数 | |
---|---|
serial | String |
退货 | |
---|---|
boolean |
设置快速启动启用
public void setFastbootEnabled (boolean enable)
为创建的设备启用或不启用快速启动支持。
参数 | |
---|---|
enable | boolean :设置支持的值。 |
受保护的方法
创建输出接收器
protected CollectingOutputReceiver createOutputReceiver ()
创建一个CollectingOutputReceiver
。
退货 | |
---|---|
CollectingOutputReceiver |
是远程环境
protected boolean isRemoteEnvironment ()
如果我们当前正在远程环境中运行,则返回 true。这将改变设备的行为。
退货 | |
---|---|
boolean |