ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


Factory untuk membuat berbagai jenis perangkat yang dapat dipantau oleh Tf

Ringkasan

Konstanta

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

Kolom

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

Konstruktor publik

ManagedTestDeviceFactory(boolean fastbootEnabled, IDeviceManager deviceManager, IDeviceMonitor allocationMonitor)

Metode publik

IManagedTestDevice createDevice(IDevice idevice)

Buat IManagedTestDevice berdasarkan IDevice yang diteruskan ke IManagedTestDevice.

IManagedTestDevice createRequestedDevice(IDevice idevice, IDeviceSelection options)

Membuat perangkat yang cocok dengan spesifikasi secara khusus

static boolean isTcpDeviceSerial(String serial)

Helper ke perangkat jika serial dari perangkat yang terhubung dari jarak jauh.

void setFastbootEnabled(boolean enable)

Mengaktifkan atau tidak dukungan fastboot untuk perangkat yang dibuat.

Metode yang dilindungi

CollectingOutputReceiver createOutputReceiver()

Buat CollectingOutputReceiver.

IRunUtil getRunUtil()

Menampilkan instance IRunUtil default.

boolean isRemoteEnvironment()

Menampilkan true jika saat ini kita sedang berjalan di lingkungan jarak jauh.

Konstanta

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Nilai Konstanta: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

Nilai Konstanta: 500 (0x00000000000001f4)

Kolom

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

Konstruktor publik

ManagedTestDeviceFactory

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

Parameter
fastbootEnabled boolean

deviceManager IDeviceManager

allocationMonitor IDeviceMonitor

Metode publik

createDevice

public IManagedTestDevice createDevice (IDevice idevice)

Buat IManagedTestDevice berdasarkan IDevice yang diteruskan ke IManagedTestDevice.

Parameter
idevice IDevice: yang akan menentukan jenis perangkat yang dibuat

Hasil
IManagedTestDevice IManagedTestDevice yang dibuat berdasarkan IDevice

createRequestedDevice

public IManagedTestDevice createRequestedDevice (IDevice idevice, 
                IDeviceSelection options)

Membuat perangkat yang cocok dengan spesifikasi secara khusus

Parameter
idevice IDevice

options IDeviceSelection

Hasil
IManagedTestDevice

isTcpDeviceSerial

public static boolean isTcpDeviceSerial (String serial)

Helper ke perangkat jika merupakan serial dari perangkat yang terhubung dari jarak jauh. format serial perangkat tcp adalah :

Parameter
serial String

Hasil
boolean

setFastbootEnabled

public void setFastbootEnabled (boolean enable)

Mengaktifkan atau tidak dukungan fastboot untuk perangkat yang dibuat.

Parameter
enable boolean: nilai menetapkan dukungan.

Metode yang dilindungi

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

Buat CollectingOutputReceiver.

Hasil
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

Menampilkan instance IRunUtil default.

Hasil
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

Menampilkan true jika saat ini kita sedang berjalan di lingkungan jarak jauh. Tindakan ini akan mengubah perilaku perangkat.

Hasil
boolean