ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

java.lang.Object
   ↳ com.android.tradefed.device.ManagedTestDeviceFactory


Nhà máy để tạo nhiều loại thiết bị mà Tf có thể theo dõi

Tóm tắt

Hằng số

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

Trường

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

Hàm khởi tạo công khai

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Phương thức công khai

IManagedTestDevice createDevice(IDevice idevice)

Tạo một IManagedTestDevice dựa trên IDevice được truyền vào.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Tạo một thiết bị cụ thể khớp với thông số kỹ thuật

static boolean isTcpDeviceSerial(String serial)

Trợ giúp cho thiết bị nếu đó là số sê-ri của một thiết bị được kết nối từ xa.

void setFastbootEnabled(boolean enable)

Bật hoặc không bật tính năng hỗ trợ khởi động nhanh cho thiết bị đã tạo.

Phương thức được bảo vệ

CollectingOutputReceiver createOutputReceiver()

Tạo CollectingOutputReceiver.

IRunUtil getRunUtil()

Trả về thực thể IRunUtil mặc định.

boolean isRemoteEnvironment()

Trả về true nếu chúng ta hiện đang chạy trong môi trường từ xa.

Hằng số

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Giá trị hằng số: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Giá trị không đổi: 500 (0x00000000000001f4)

Trường

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

mFastbootEnabled

protected boolean mFastbootEnabled

Hàm khởi tạo công khai

ManagedTestDeviceFactory

public ManagedTestDeviceFactory (boolean fastbootEnabled, 
                IDeviceManager deviceManager, 
                IDeviceMonitor allocationMonitor)

Tham số
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Phương thức công khai

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Tạo một IManagedTestDevice dựa trên IDevice được truyền vào.

Tham số
idevice IDevice: sẽ xác định loại thiết bị được tạo

Giá trị trả về
IManagedTestDevice IManagedTestDevice được tạo dựa trên IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Tạo một thiết bị cụ thể khớp với thông số kỹ thuật

Tham số
idevice IDevice

options IDeviceSelection

Giá trị trả về
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Trình trợ giúp cho thiết bị nếu đó là thiết bị nối tiếp từ mộ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à :

Tham số
serial String

Giá trị trả về
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Bật hoặc không bật tính năng hỗ trợ khởi động nhanh cho thiết bị đã tạo.

Tham số
enable boolean: giá trị đặt tính năng hỗ trợ.

Phương thức được bảo vệ

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Tạo CollectingOutputReceiver.

Giá trị trả về
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Trả về thực thể IRunUtil mặc định.

Giá trị trả về
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Trả về true nếu chúng ta hiện đang chạy trong môi trường từ xa. Điều này sẽ làm thay đổi hành vi của thiết bị.

Giá trị trả về
boolean