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

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)

void setFastbootEnabled(boolean enable)

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

boolean checkFrameworkSupport(IDevice idevice)

Trình trợ giúp trả về true nếu thiết bị có hỗ trợ khung.

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.

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.

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

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)

Tham số
idevice IDevice

Giá trị trả về
IManagedTestDevice

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Tham số
enable boolean

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

checkFrameworkSupport

protected boolean checkFrameworkSupport (IDevice idevice)

Trình trợ giúp trả về true nếu thiết bị có hỗ trợ khung.

Tham số
idevice IDevice

Giá trị trả về
boolean

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

isTcpDeviceSerial

protected 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. định dạng nối tiếp của thiết bị tcp là :

Tham số
serial String

Trả về
boolean