托管测试设备工厂

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 ()

创建一个CollectingOutputReceiver

IRunUtil getRunUtil ()

返回默认的IRunUtil实例。

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)

领域

检查_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

移动分配监视器

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 IDevice

退货
IManagedTestDevice

设置快速启动启用

public void setFastbootEnabled (boolean enable)

参数
enable boolean

受保护的方法

检查框架支持

protected boolean checkFrameworkSupport (IDevice idevice)

如果设备有框架支持,则返回 true 的帮助程序。

参数
idevice IDevice

退货
boolean

创建输出接收器

protected CollectingOutputReceiver createOutputReceiver ()

创建一个CollectingOutputReceiver

退货
CollectingOutputReceiver

获取运行工具

protected IRunUtil getRunUtil ()

返回默认的IRunUtil实例。

退货
IRunUtil

是远程环境

protected boolean isRemoteEnvironment ()

如果我们当前正在远程环境中运行,则返回 true。这将改变设备的行为。

退货
boolean

isTcpDeviceSerial

protected boolean isTcpDeviceSerial (String serial)

如果是来自远程连接设备的串行设备,则为设备的帮助程序。 TCP设备的串行格式是:

参数
serial String

退货
boolean