ManagedTestDeviceFactory
public class ManagedTestDeviceFactory
extends Object
implements IManagedTestDeviceFactory
java.lang.Object | |
↳ | com.android.tradefed.device.ManagedTestDeviceFactory |
Nhà máy tạo ra các loại thiết bị khác nhau có thể được giám sát bởi Tf
Bản tóm tắt
hằng số | |
---|---|
int | FRAMEWORK_CHECK_MAX_RETRY |
long | FRAMEWORK_CHECK_SLEEP_MS
|
Lĩnh vực | |
---|---|
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
|
nhà thầu công cộng | |
---|---|
ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor) |
Phương thức công khai | |
---|---|
IManagedTestDevice | createDevice (IDevice idevice) Tạo một |
IManagedTestDevice | createRequestedDevice (IDevice idevice, IDeviceSelection options) Cụ thể tạo một thiết bị phù hợp với thông số kỹ thuật |
static boolean | isTcpDeviceSerial (String serial) Trình trợ giúp cho thiết bị nếu đó là sê-ri từ thiết bị được kết nối từ xa. |
void | setFastbootEnabled (boolean enable) Bật hoặc không hỗ trợ fastboot cho thiết bị được tạo. |
phương pháp được bảo vệ | |
---|---|
CollectingOutputReceiver | createOutputReceiver () Tạo một |
IRunUtil | getRunUtil () Trả về phiên bản |
boolean | isRemoteEnvironment () Trả về true nếu chúng tôi hiện đang chạy trong một môi trường từ xa. |
hằng số
FRAMEWORK_CHECK_MAX_RETRY
protected static final int FRAMEWORK_CHECK_MAX_RETRY
Giá trị không đổi: 3 (0x00000003)
FRAMEWORK_CHECK_SLEEP_MS
protected static final long FRAMEWORK_CHECK_SLEEP_MS
Giá trị không đổi: 500 (0x00000000000001f4)
Lĩnh vực
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
mAllocationMonitor
protected IDeviceMonitor mAllocationMonitor
mDeviceManager
protected IDeviceManager mDeviceManager
Đã bật mFastboot
protected boolean mFastbootEnabled
nhà thầu công cộng
ManagedTestDeviceFactory
public ManagedTestDeviceFactory (boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)
Thông số | |
---|---|
fastbootEnabled | boolean |
deviceManager | IDeviceManager |
allocationMonitor | IDeviceMonitor |
Phương thức công khai
tạo thiết bị
public IManagedTestDevice createDevice (IDevice idevice)
Tạo một IManagedTestDevice
dựa trên IDevice
được truyền cho nó.
Thông số | |
---|---|
idevice | IDevice : sẽ xác định loại thiết bị được tạo |
trả lại | |
---|---|
IManagedTestDevice | một IManagedTestDevice được tạo dựa trên IDevice |
tạoRequestedDevice
public IManagedTestDevice createRequestedDevice (IDevice idevice, IDeviceSelection options)
Cụ thể tạo một thiết bị phù hợp với thông số kỹ thuật
Thông số | |
---|---|
idevice | IDevice |
options | IDeviceSelection |
trả lại | |
---|---|
IManagedTestDevice |
isTcpDeviceSerial
public static boolean isTcpDeviceSerial (String serial)
Trình trợ giúp cho thiết bị nếu đó là sê-ri từ thiết bị được kết nối từ xa. định dạng nối tiếp của thiết bị tcp là
Thông số | |
---|---|
serial | String |
trả lại | |
---|---|
boolean |
setFastbootEnabled
public void setFastbootEnabled (boolean enable)
Bật hoặc không hỗ trợ fastboot cho thiết bị được tạo.
Thông số | |
---|---|
enable | boolean : giá trị đặt hỗ trợ. |
phương pháp được bảo vệ
tạoOutputReceiver
protected CollectingOutputReceiver createOutputReceiver ()
Tạo một CollectingOutputReceiver
.
trả lại | |
---|---|
CollectingOutputReceiver |
isRemoteMôi trường
protected boolean isRemoteEnvironment ()
Trả về true nếu chúng tôi hiện đang chạy trong một môi trường từ xa. Điều này sẽ thay đổi hành vi của thiết bị.
trả lại | |
---|---|
boolean |