NativeDeviceStateMonitor
public
class
NativeDeviceStateMonitor
extends Object
implements
IDeviceStateMonitor
java.lang.Object | |
↳ | com.android.tradefed.device.NativeDeviceStateMonitor |
フレームワークのサポートなしで IDevice
の状態をモニタリングするためのヘルパークラス。
概要
定数 | |
---|---|
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
|
getFastbootSerialNumber()
|
String
|
getMountPoint(String mountName)
|
String
|
getSerialNumber()
|
boolean
|
isAdbTcp()
|
void
|
setDefaultAvailableTimeout(long timeoutMs)
|
void
|
setDefaultOnlineTimeout(long timeoutMs)
|
void
|
setFastbootSerialNumber(String serial)
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)
|
保護されたメソッド | |
---|---|
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 |
getFastbootSerialNumber
public String getFastbootSerialNumber ()
戻り値 | |
---|---|
String |
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()
で、デバイスが使用可能になるまで待機する時間をミリ秒単位で設定します。
パラメータ | |
---|---|
timeoutMs |
long |
setDefaultOnlineTimeout
public void setDefaultOnlineTimeout (long timeoutMs)
waitForDeviceOnline()
で、デバイスがオンラインになるまでの待機時間をミリ秒単位で設定します。
パラメータ | |
---|---|
timeoutMs |
long |
setFastbootSerialNumber
public void setFastbootSerialNumber (String serial)
Fastboot モードのシリアル番号を設定します。
パラメータ | |
---|---|
serial |
String |
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 |
postOnlineCheck
protected boolean postOnlineCheck (long waitTime)
オンライン デバイスで行う追加のチェック
パラメータ | |
---|---|
waitTime |
long : あきらめる前に待機する時間(ミリ秒単位) |
戻り値 | |
---|---|
boolean |
waitTime が期限切れになる前にチェックが成功した場合は true 。それ以外の場合は false |
waitForStoreMount
protected boolean waitForStoreMount (long waitTime)
デバイスの外部ストアがマウントされるまで待ちます。
パラメータ | |
---|---|
waitTime |
long : あきらめる前に待機する時間(ミリ秒単位) |
戻り値 | |
---|---|
boolean |
true : waitTime が期限切れになる前に外部ストアがマウントされた場合。それ以外の場合は false |