NativeDeviceStateMonitor

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

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


فئة مساعدة لمراقبة حالة IDevice بدون إطار العمل.

ملخّص

الثوابت

long MAX_CHECK_POLL_TIME

int MAX_OP_TIME

الحد الأقصى لوقت العملية بالكيلوميل في الثانية لطلب "الاستعلام عن الاستجابة"

الحقول

protected static final String PERM_DENIED_ERROR_PATTERN

وظائف الإنشاء العامة

NativeDeviceStateMonitor(IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

الطرق العامة

TestDeviceState getDeviceState()

String getFastbootSerialNumber()

String getMountPoint(String mountName)

String getSerialNumber()

boolean isAdbTcp()

void setDefaultAvailableTimeout(long timeoutMs)

اضبط الوقت بالملي ثانية للانتظار إلى أن يصبح الجهاز متاحًا في waitForDeviceAvailable().

void setDefaultOnlineTimeout(long timeoutMs)

اضبط الوقت بالملي ثانية للانتظار إلى أن يصبح الجهاز متصلاً بالإنترنت في waitForDeviceOnline().

void setFastbootSerialNumber(String serial)

اضبط الرقم التسلسلي لوضع Fastboot.

void setIDevice(IDevice newDevice)
void setState(TestDeviceState deviceState)

boolean waitForBootComplete(long waitTime)

IDevice waitForDeviceAvailable(long waitTime)

IDevice waitForDeviceAvailable()

boolean waitForDeviceBootloader(long time)

void waitForDeviceBootloaderStateUpdate()
boolean waitForDeviceFastbootd(String fastbootPath, long time)

IDevice waitForDeviceInRecovery()
boolean waitForDeviceInRecovery(long waitTime)

boolean waitForDeviceInSideload(long waitTime)

boolean waitForDeviceNotAvailable(long waitTime)

IDevice waitForDeviceOnline()

IDevice waitForDeviceOnline(long waitTime)

boolean waitForDeviceShell(long waitTime)

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

CollectingOutputReceiver createOutputReceiver()

متاح للاختبار

long getCheckPollTime()

متاح للاختبار

long getCurrentTime()

متاح للاختبار

IDevice getIDevice()
boolean postOnlineCheck(long waitTime)

عمليات الفحص الإضافية التي سيتم إجراؤها على جهاز على الإنترنت

boolean waitForStoreMount(long waitTime)

تنتظر هذه الحالة حتى يتم تركيب وحدة التخزين الخارجية للجهاز.

الثوابت

MAX_CHECK_POLL_TIME

protected static final long MAX_CHECK_POLL_TIME

القيمة الثابتة: 30000 (0x0000000000007530)

MAX_OP_TIME

protected static final int MAX_OP_TIME

الحد الأقصى لوقت العملية بالكيلوميل في الثانية لطلب "الاستعلام عن الاستجابة"

القيمة الثابتة: 10000 (0x00002710)

الحقول

PERM_DENIED_ERROR_PATTERN

protected static final String PERM_DENIED_ERROR_PATTERN

وظائف الإنشاء العامة

NativeDeviceStateMonitor

public NativeDeviceStateMonitor (IDeviceManager mgr, 
                IDevice device, 
                boolean fastbootEnabled)

المعلمات
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

الطرق العامة

getDeviceState

public TestDeviceState getDeviceState ()

المرتجعات
TestDeviceState

getFastbootSerialNumber

public String getFastbootSerialNumber ()

المرتجعات
String

getMountPoint

public String getMountPoint (String mountName)

المعلمات
mountName String

المرتجعات
String

الحصول على الرقم التسلسلي

public String getSerialNumber ()

المرتجعات
String

isAdbTcp

public boolean isAdbTcp ()

المرتجعات
boolean

setDefaultAvailableTimeout

public void setDefaultAvailableTimeout (long timeoutMs)

يمكنك ضبط الوقت بالميلي ثانية لانتظار توفُّر الجهاز في waitForDeviceAvailable().

المعلمات
timeoutMs long

setDefaultOnlineTimeout

public void setDefaultOnlineTimeout (long timeoutMs)

اضبط الوقت بالملي ثانية للانتظار إلى أن يصبح الجهاز متصلاً بالإنترنت في waitForDeviceOnline().

المعلمات
timeoutMs long

setFastbootSerialNumber

public void setFastbootSerialNumber (String serial)

اضبط الرقم التسلسلي لوضع Fastboot.

المعلمات
serial String

setIDevice

public void setIDevice (IDevice newDevice)

المعلمات
newDevice IDevice

setState

public void setState (TestDeviceState deviceState)

المعلمات
deviceState TestDeviceState

waitForBootComplete

public boolean waitForBootComplete (long waitTime)

المعلمات
waitTime long

المرتجعات
boolean

انتظار_الجهاز متاح

public IDevice waitForDeviceAvailable (long waitTime)

المعلمات
waitTime long

المرتجعات
IDevice

waitForDeviceAvailable

public IDevice waitForDeviceAvailable ()

المرتجعات
IDevice

waitForDeviceBootloader

public boolean waitForDeviceBootloader (long time)

المعلمات
time long

المرتجعات
boolean

waitForDeviceBootloaderStateUpdate

public void waitForDeviceBootloaderStateUpdate ()

waitForDeviceFastbootd

public boolean waitForDeviceFastbootd (String fastbootPath, 
                long time)

المعلمات
fastbootPath String

time long

المرتجعات
boolean

waitForDeviceInRecovery

public IDevice waitForDeviceInRecovery ()

المرتجعات
IDevice

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

المعلمات
waitTime long

المرتجعات
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

المعلمات
waitTime long

المرتجعات
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

المعلمات
waitTime long

المرتجعات
boolean

انتظار الجهاز على الإنترنت

public IDevice waitForDeviceOnline ()

المرتجعات
IDevice

waitForDeviceOnline

public IDevice waitForDeviceOnline (long waitTime)

المعلمات
waitTime long

المرتجعات
IDevice

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

المعلمات
waitTime long

المرتجعات
boolean

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

createOutputReceiver

protected CollectingOutputReceiver createOutputReceiver ()

متاح للاختبار

المرتجعات
CollectingOutputReceiver CollectingOutputReceiver

getCheckPollTime

protected long getCheckPollTime ()

متاح للاختبار

المرتجعات
long

getCurrentTime

protected long getCurrentTime ()

متاح للاختبار

المرتجعات
long

getIDevice

protected IDevice getIDevice ()

المرتجعات
IDevice IDevice ربط بمراقب الحالة

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

عمليات التحقّق الإضافية التي يجب إجراؤها على جهاز متصل بالإنترنت

المعلمات
waitTime long: الوقت بالمللي ثانية للانتظار قبل الاستسلام

المرتجعات
boolean true إذا كانت عمليات التحقّق ناجحة قبل انتهاء مهلة الانتظار false غير ذلك

waitForStoreMount

protected boolean waitForStoreMount (long waitTime)

تنتظر هذه الحالة حتى يتم تركيب وحدة التخزين الخارجية للجهاز.

المعلمات
waitTime long: الوقت بالمللي ثانية للانتظار قبل الاستسلام

المرتجعات
boolean true إذا تم تثبيت المتجر الخارجي قبل انتهاء صلاحية مهلة الانتظار false في الحالات الأخرى