ManagedTestDeviceFactory

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

public static final String NOTIFY_AS_NATIVE

protected IDeviceMonitor mAllocationMonitor

protected IDeviceManager mDeviceManager

protected boolean mFastbootEnabled

ตัวสร้างแบบสาธารณะ

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

เมธอดสาธารณะ

IManagedTestDevice createDevice(IDevice idevice)

สร้าง IManagedTestDevice โดยอิงตาม IDevice ที่ส่งผ่าน

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

สร้างอุปกรณ์ที่ตรงกับข้อกําหนดโดยเฉพาะ

static boolean isTcpDeviceSerial(String serial)

ตัวช่วยสำหรับอุปกรณ์หากเป็นซีเรียลจากอุปกรณ์ที่เชื่อมต่อจากระยะไกล

void setFastbootEnabled(boolean enable)

เปิดหรือปิดใช้การรองรับการรีบูตระบบอย่างรวดเร็วสำหรับอุปกรณ์ที่สร้าง

วิธีการที่มีการป้องกัน

CollectingOutputReceiver createOutputReceiver()

สร้าง CollectingOutputReceiver

IRunUtil getRunUtil()

แสดงอินสแตนซ์ IRunUtil เริ่มต้น

boolean isRemoteEnvironment()

แสดงค่า "จริง" หากขณะนี้เรากําลังทํางานในสภาพแวดล้อมระยะไกล

ค่าคงที่

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)

ช่อง

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

ตัวสร้างแบบสาธารณะ

ManagedTestDeviceFactory

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

พารามิเตอร์
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

เมธอดสาธารณะ

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

สร้าง IManagedTestDevice โดยอิงตาม IDevice ที่ส่งผ่าน

พารามิเตอร์
idevice IDevice: ที่จะกำหนดประเภทของอุปกรณ์ที่สร้าง

คิกรีเทิร์น
IManagedTestDevice IManagedTestDevice ที่สร้างขึ้นตาม IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

สร้างอุปกรณ์ที่ตรงกับข้อกําหนดโดยเฉพาะ

พารามิเตอร์
idevice IDevice

options IDeviceSelection

คิกรีเทิร์น
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

ตัวช่วยสำหรับอุปกรณ์ หากเป็นซีเรียลจากอุปกรณ์ที่เชื่อมต่อจากระยะไกล รูปแบบซีเรียลของอุปกรณ์ TCP จะเป็น :

พารามิเตอร์
serial String

คิกรีเทิร์น
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

เปิดหรือปิดใช้การรองรับการรีบูตระบบอย่างรวดเร็วสำหรับอุปกรณ์ที่สร้าง

พารามิเตอร์
enable boolean: ตั้งค่าการสนับสนุน

วิธีการที่มีการป้องกัน

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

สร้าง CollectingOutputReceiver

คิกรีเทิร์น
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

แสดงอินสแตนซ์ IRunUtil เริ่มต้น

คิกรีเทิร์น
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

แสดงค่า "จริง" หากขณะนี้เรากําลังทํางานในสภาพแวดล้อมระยะไกล ซึ่งจะเปลี่ยนลักษณะการทํางานของอุปกรณ์

คิกรีเทิร์น
boolean