ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Nhà máy tạo ra nhiều loại thiết bị mà Tf có thể giám sát

Tóm tắt

Hằng số

String IPADDRESS_PATTERN

String NOTIFY_AS_NATIVE

Trường

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ị thông minh đượ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ề phiên bản IRunUtil mặc định.

boolean isRemoteEnvironment()

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

Hằng số

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

Giá trị không đổi: "((^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]))|(localhost)){1}"

NOTIFY_AS_NATIVE

public static final String NOTIFY_AS_NATIVE

Giá trị không đổi: "NOTIFY_AS_NATIVE"

Trường

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ợ giúp cho thiết bị nếu đó là một cổng nối tiếp của một thiết bị thông minh được kết nối từ xa. định dạng cổ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 chế độ 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ề phiên bản 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ột môi trường từ xa. Thao tác này sẽ thay đổi hành vi của thiết bị.

Giá trị trả về
boolean