ManagedTestDeviceFactory

public class ManagedTestDeviceFactory
extends Object implements IManagedTestDeviceFactory

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


مصنع لإنشاء أنواع مختلفة من الأجهزة التي يمكن مراقبتها باستخدام Tf

ملخّص

الثوابت

String CHECK_PM_CMD

String EXPECTED_ERROR

String EXPECTED_RES

int FRAMEWORK_CHECK_MAX_RETRY

long FRAMEWORK_CHECK_SLEEP_MS

String IPADDRESS_PATTERN

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)

تفعيل أو عدم تفعيل توافق fastboot مع الجهاز الذي تم إنشاؤه

الطُرق المحمية

CollectingOutputReceiver createOutputReceiver()

أنشئ CollectingOutputReceiver.

IRunUtil getRunUtil()

لعرض مثيل IRunUtil التلقائي

boolean isRemoteEnvironment()

عرض القيمة "صحيح" إذا كنا نعمل حاليًا في بيئة بعيدة

الثوابت

CHECK_PM_CMD

protected static final String CHECK_PM_CMD

Constant Value: "ls %s"

EXPECTED_ERROR

protected static final String EXPECTED_ERROR

Constant Value: "No such file or directory"

EXPECTED_RES

protected static final String EXPECTED_RES

Constant Value: "/system/bin/pm"

FRAMEWORK_CHECK_MAX_RETRY

protected static final int FRAMEWORK_CHECK_MAX_RETRY

Constant Value: 3 (0x00000003)

FRAMEWORK_CHECK_SLEEP_MS

protected static final long FRAMEWORK_CHECK_SLEEP_MS

القيمة الثابتة: 500 (0x00000000000001f4)

IPADDRESS_PATTERN

public static final String IPADDRESS_PATTERN

القيمة الثابتة: "((^([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

القيمة الثابتة: "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 a IManagedTestDevice created base on the 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)

تفعيل أو عدم تفعيل توافق fastboot مع الجهاز الذي تم إنشاؤه

المعلمات
enable boolean: مجموعة القيم التي يمكن استخدامها.

الطُرق المحمية

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

أنشئ CollectingOutputReceiver.

المرتجعات
CollectingOutputReceiver

getRunUtil

protected IRunUtil getRunUtil ()

لعرض مثيل IRunUtil التلقائي

المرتجعات
IRunUtil

isRemoteEnvironment

protected boolean isRemoteEnvironment ()

عرض القيمة "صحيح" إذا كنا نعمل حاليًا في بيئة بعيدة سيؤدي ذلك إلى تغيير سلوك الجهاز.

المرتجعات
boolean