Google is committed to advancing racial equity for Black communities. See how.
本頁面由 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

0f05205​​db0

參量
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

protected IDevice getIDevice ()

退貨
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