Bản địaThiết bịTrạng tháiMàn hình

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

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


Lớp trình trợ giúp để theo dõi trạng thái của IDevice không hỗ trợ khung.

Bản tóm tắt

Hằng số

long MAX_CHECK_POLL_TIME

int MAX_OP_TIME

thời gian hoạt động tối đa tính bằng ms cho lệnh 'thăm dò phản hồi'

Lĩnh vực

protected static final String PERM_DENIED_ERROR_PATTERN

Nhà thầu xây dựng công cộng

NativeDeviceStateMonitor ( IDeviceManager mgr, IDevice device, boolean fastbootEnabled)

Phương pháp công khai

TestDeviceState getDeviceState ()

String getFastbootSerialNumber ()

String getMountPoint (String mountName)

String getSerialNumber ()

boolean isAdbTcp ()

void setDefaultAvailableTimeout (long timeoutMs)

Đặt thời gian tính bằng ms để chờ thiết bị có sẵn trong waitForDeviceAvailable() .

void setDefaultOnlineTimeout (long timeoutMs)

Đặt thời gian tính bằng ms để đợi thiết bị trực tuyến trong waitForDeviceOnline() .

void setFastbootSerialNumber (String serial)

Đặt số sê-ri chế độ 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)

Phương pháp được bảo vệ

CollectingOutputReceiver createOutputReceiver ()

Tiếp xúc để thử nghiệm

long getCheckPollTime ()

Tiếp xúc để thử nghiệm

long getCurrentTime ()

Tiếp xúc để thử nghiệm

IDevice getIDevice ()
boolean postOnlineCheck (long waitTime)

Các bước kiểm tra bổ sung cần được thực hiện trên thiết bị Trực tuyến

boolean waitForStoreMount (long waitTime)

Đợi cửa hàng bên ngoài của thiết bị được gắn kết.

Hằng số

MAX_CHECK_POLL_TIME

protected static final long MAX_CHECK_POLL_TIME

Giá trị không đổi: 30000 (0x0000000000007530)

MAX_OP_TIME

protected static final int MAX_OP_TIME

thời gian hoạt động tối đa tính bằng ms cho lệnh 'thăm dò phản hồi'

Giá trị không đổi: 10000 (0x00002710)

Lĩnh vực

PERM_DENIED_ERROR_PATTERN

protected static final String PERM_DENIED_ERROR_PATTERN

Nhà thầu xây dựng công cộng

Bản địaThiết bịTrạng tháiMàn hình

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

Thông số
mgr IDeviceManager

device IDevice

fastbootEnabled boolean

Phương pháp công khai

getDeviceState

public TestDeviceState getDeviceState ()

Trả lại
TestDeviceState

lấyFastbootSerialNumber

public String getFastbootSerialNumber ()

Trả lại
String

getMountPoint

public String getMountPoint (String mountName)

Thông số
mountName String

Trả lại
String

lấy số Serial

public String getSerialNumber ()

Trả lại
String

isAdbTcp

public boolean isAdbTcp ()

Trả lại
boolean

setDefaultAvailableTimeout

public void setDefaultAvailableTimeout (long timeoutMs)

Đặt thời gian tính bằng ms để chờ thiết bị có sẵn trong waitForDeviceAvailable() .

Thông số
timeoutMs long

setDefaultOnlineTimeout

public void setDefaultOnlineTimeout (long timeoutMs)

Đặt thời gian tính bằng ms để đợi thiết bị trực tuyến trong waitForDeviceOnline() .

Thông số
timeoutMs long

setFastbootSerialNumber

public void setFastbootSerialNumber (String serial)

Đặt số sê-ri chế độ fastboot.

Thông số
serial String

setIDevice

public void setIDevice (IDevice newDevice)

Thông số
newDevice IDevice

setState

public void setState (TestDeviceState deviceState)

Thông số
deviceState TestDeviceState

chờForBootComplete

public boolean waitForBootComplete (long waitTime)

Thông số
waitTime long

Trả lại
boolean

chờForDeviceCó sẵn

public IDevice waitForDeviceAvailable (long waitTime)

Thông số
waitTime long

Trả lại
IDevice

chờForDeviceCó sẵn

public IDevice waitForDeviceAvailable ()

Trả lại
IDevice

waitForDeviceBootloader

public boolean waitForDeviceBootloader (long time)

Thông số
time long

Trả lại
boolean

waitForDeviceBootloaderStateUpdate

public void waitForDeviceBootloaderStateUpdate ()

chờForDeviceFastbootd

public boolean waitForDeviceFastbootd (String fastbootPath, 
                long time)

Thông số
fastbootPath String

time long

Trả lại
boolean

chờForDeviceInRecovery

public IDevice waitForDeviceInRecovery ()

Trả lại
IDevice

chờForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

Thông số
waitTime long

Trả lại
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

Thông số
waitTime long

Trả lại
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

Thông số
waitTime long

Trả lại
boolean

waitForDeviceTrực tuyến

public IDevice waitForDeviceOnline ()

Trả lại
IDevice

waitForDeviceTrực tuyến

public IDevice waitForDeviceOnline (long waitTime)

Thông số
waitTime long

Trả lại
IDevice

chờForDeviceShell

public boolean waitForDeviceShell (long waitTime)

Thông số
waitTime long

Trả lại
boolean

Phương pháp được bảo vệ

tạoĐầu raNhận

protected CollectingOutputReceiver createOutputReceiver ()

Tiếp xúc để thử nghiệm

Trả lại
CollectingOutputReceiver CollectingOutputReceiver

getCheckPollTime

protected long getCheckPollTime ()

Tiếp xúc để thử nghiệm

Trả lại
long

lấy thời gian hiện tại

protected long getCurrentTime ()

Tiếp xúc để thử nghiệm

Trả lại
long

getIDevice

protected IDevice getIDevice ()

Trả lại
IDevice IDevice liên kết với trình giám sát trạng thái

bài đăngTrực tuyếnKiểm tra

protected boolean postOnlineCheck (long waitTime)

Các bước kiểm tra bổ sung cần được thực hiện trên thiết bị Trực tuyến

Thông số
waitTime long : thời gian tính bằng mili giây để chờ trước khi bỏ cuộc

Trả lại
boolean true nếu kiểm tra thành công trước khi WaitTime hết hạn. false khác

chờForStoreMount

protected boolean waitForStoreMount (long waitTime)

Đợi cửa hàng bên ngoài của thiết bị được gắn kết.

Thông số
waitTime long : thời gian tính bằng mili giây để chờ trước khi bỏ cuộc

Trả lại
boolean true nếu cửa hàng bên ngoài được gắn kết trước khi WaitTime hết hạn. false khác