Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

NativeDeviceStateMonitor

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

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


在没有框架支持的情况下用于监视IDevice状态的Helper类。

摘要

常数

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 getMountPoint (String mountName)

String getSerialNumber ()

boolean isAdbTcp ()

void setDefaultAvailableTimeout (long timeoutMs)

waitForDeviceAvailable()以毫秒为单位设置等待设备可用的waitForDeviceAvailable()

void setDefaultOnlineTimeout (long timeoutMs)

waitForDeviceOnline()设置以毫秒为单位的时间,以等待设备在线。

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

getMountPoint

public String getMountPoint (String mountName)

参量
mountName String

退货
String

getSerialNumber

public String getSerialNumber ()

退货
String

isAdbTcp

public boolean isAdbTcp ()

退货
boolean

setDefaultAvailableTimeout

public void setDefaultAvailableTimeout (long timeoutMs)

waitForDeviceAvailable()以毫秒为单位设置等待设备可用的waitForDeviceAvailable()

参量
timeoutMs long

setDefaultOnlineTimeout

public void setDefaultOnlineTimeout (long timeoutMs)

waitForDeviceOnline()设置以毫秒为单位的时间,以等待设备在线。

参量
timeoutMs long

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

waitForDeviceAvailable

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

waitForDeviceOnline

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

ce33​​22125d

退货
IDevice IDevice与状态监视器关联

postOnlineCheck

protected boolean postOnlineCheck (long waitTime)

要在在线设备上进行的其他检查

参量
waitTime long :放弃之前要等待的时间(以毫秒为单位)

退货
boolean 如果在waitTime到期之前检查成功,则为true 。否则为false

waitForStoreMount

protected boolean waitForStoreMount (long waitTime)

等待安装设备的外部存储。

参量
waitTime long :放弃之前要等待的时间(以毫秒为单位)

退货
boolean 如果在waitTime到期之前安装了外部存储,则为true 。否则为false