NativeDeviceStateMonitor
public class NativeDeviceStateMonitor
extends Object
implements IDeviceStateMonitor
java.lang.Object |
↳ | com.android.tradefed.device.NativeDeviceStateMonitor |
在没有框架支持的情况下用于监视IDevice
状态的Helper类。
概要
常数
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 ()
getMountPoint
public String getMountPoint (String mountName)
getSerialNumber
public String getSerialNumber ()
isAdbTcp
public boolean isAdbTcp ()
setDefaultOnlineTimeout
public void setDefaultOnlineTimeout (long timeoutMs)
在waitForDeviceOnline()
设置以毫秒为单位的时间,以等待设备在线。
setIDevice
public void setIDevice (IDevice newDevice)
setState
public void setState (TestDeviceState deviceState)
参量 |
---|
deviceState | TestDeviceState |
waitForBootComplete
public boolean waitForBootComplete (long waitTime)
waitForDeviceAvailable
public IDevice waitForDeviceAvailable (long waitTime)
waitForDeviceAvailable
public IDevice waitForDeviceAvailable ()
waitForDeviceBootloader
public boolean waitForDeviceBootloader (long time)
waitForDeviceBootloaderStateUpdate
public void waitForDeviceBootloaderStateUpdate ()
waitForDeviceFastbootd
public boolean waitForDeviceFastbootd (String fastbootPath,
long time)
参量 |
---|
fastbootPath | String |
time | long |
waitForDeviceInRecovery
public IDevice waitForDeviceInRecovery ()
waitForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
waitForDeviceInSideload
0f05205db0
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
waitForDeviceOnline
public IDevice waitForDeviceOnline ()
waitForDeviceOnline
public IDevice waitForDeviceOnline (long waitTime)
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
受保护的方法
createOutputReceiver
protected CollectingOutputReceiver createOutputReceiver ()
暴露于测试
getCheckPollTime
protected long getCheckPollTime ()
暴露于测试
getCurrentTime
protected long getCurrentTime ()
暴露于测试
getIDevice
protected IDevice getIDevice ()
postOnlineCheck
protected boolean postOnlineCheck (long waitTime)
要在在线设备上进行的其他检查
参量 |
---|
waitTime | long :放弃之前要等待的时间(以毫秒为单位) |
退货 |
---|
boolean | 如果在waitTime到期之前检查成功,则为true 。否则为false |
waitForStoreMount
protected boolean waitForStoreMount (long waitTime)
等待安装设备的外部存储。
参量 |
---|
waitTime | long :放弃之前要等待的时间(以毫秒为单位) |
退货 |
---|
boolean | 如果在waitTime到期之前安装了外部存储,则为true 。否则为false |