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 |
Các lớp con trực tiếp đã biết |
Các lớp con gián tiếp đã biết NestedDeviceStateMonitor | Trình giám sát trạng thái thiết bị thực hiện các kiểm tra bổ sung trên thiết bị lồng nhau để phù hợp với các thông số cụ thể của môi trường ảo hóa. |
|
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ố
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 ()
lấyFastbootSerialNumber
public String getFastbootSerialNumber ()
getMountPoint
public String getMountPoint (String mountName)
Thông số |
---|
mountName | String |
lấy số Serial
public String getSerialNumber ()
isAdbTcp
public boolean isAdbTcp ()
setDefaultAvailableTimeout
public void setDefaultAvailableTimeout (long timeoutMs)
Đặt thời gian tính bằng ms để chờ thiết bị có sẵn trong waitForDeviceAvailable()
.
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()
.
setFastbootSerialNumber
public void setFastbootSerialNumber (String serial)
Đặt số sê-ri chế độ fastboot.
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)
chờForDeviceCó sẵn
public IDevice waitForDeviceAvailable (long waitTime)
chờForDeviceCó sẵn
public IDevice waitForDeviceAvailable ()
waitForDeviceBootloader
public boolean waitForDeviceBootloader (long time)
waitForDeviceBootloaderStateUpdate
public void waitForDeviceBootloaderStateUpdate ()
chờForDeviceFastbootd
public boolean waitForDeviceFastbootd (String fastbootPath,
long time)
Thông số |
---|
fastbootPath | String |
time | long |
chờForDeviceInRecovery
public IDevice waitForDeviceInRecovery ()
chờForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
waitForDeviceInSideload
public boolean waitForDeviceInSideload (long waitTime)
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
waitForDeviceTrực tuyến
public IDevice waitForDeviceOnline ()
waitForDeviceTrực tuyến
public IDevice waitForDeviceOnline (long waitTime)
chờForDeviceShell
public boolean waitForDeviceShell (long waitTime)
Phương pháp được bảo vệ
tạoĐầu raNhận
protected CollectingOutputReceiver createOutputReceiver ()
Tiếp xúc để thử nghiệm
getCheckPollTime
protected long getCheckPollTime ()
Tiếp xúc để thử nghiệm
lấy thời gian hiện tại
protected long getCurrentTime ()
Tiếp xúc để thử nghiệm
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 |