NativeDeviceStateMonitor

public class NativeDeviceStateMonitor
extends Object implements IDeviceStateMonitor

java.lang.オブジェクト
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)

waitForDeviceAvailable()でデバイスが使用可能になるまで待機する時間をミリ秒単位で設定します。

void setDefaultOnlineTimeout (long timeoutMs)

waitForDeviceOnline()でデバイスがオンラインになるまで待機する時間をミリ秒単位で設定します。

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

パブリックメソッド

デバイス状態の取得

public TestDeviceState getDeviceState ()

戻り値
TestDeviceState

getFastbootSerialNumber

public String getFastbootSerialNumber ()

戻り値
String

マウントポイントの取得

public String getMountPoint (String mountName)

パラメーター
mountName String

戻り値
String

getシリアル番号

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

ブート完了を待つ

public boolean waitForBootComplete (long waitTime)

パラメーター
waitTime long

戻り値
boolean

デバイスが利用可能になるまで待機します

public IDevice waitForDeviceAvailable (long waitTime)

パラメーター
waitTime long

戻り値
IDevice

デバイスが利用可能になるまで待機します

public IDevice waitForDeviceAvailable ()

戻り値
IDevice

デバイスブートローダーの待機

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

デバイスの回復を待つ

public IDevice waitForDeviceInRecovery ()

戻り値
IDevice

デバイスの回復を待つ

public boolean waitForDeviceInRecovery (long waitTime)

パラメーター
waitTime long

戻り値
boolean

デバイスインサイドロードを待つ

public boolean waitForDeviceInSideload (long waitTime)

パラメーター
waitTime long

戻り値
boolean

デバイスが利用できないのを待ちます

public boolean waitForDeviceNotAvailable (long waitTime)

パラメーター
waitTime long

戻り値
boolean

デバイスオンラインで待つ

public IDevice waitForDeviceOnline ()

戻り値
IDevice

デバイスオンラインで待つ

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

現在の時刻を取得する

protected long getCurrentTime ()

テストのために暴露された

戻り値
long

getIDevice

protected IDevice getIDevice ()

戻り値
IDevice IDeviceと状態モニターの関連付け

投稿オンラインチェック

protected boolean postOnlineCheck (long waitTime)

オンラインデバイスで実行する追加のチェック

パラメーター
waitTime long : 諦めるまでの待機時間 (ミリ秒)

戻り値
boolean waitTime が期限切れになる前にチェックが成功した場合はtrue 。それ以外の場合はfalse

ストアマウントを待つ

protected boolean waitForStoreMount (long waitTime)

デバイスの外部ストアがマウントされるのを待ちます。

パラメーター
waitTime long : 諦めるまでの待機時間 (ミリ秒)

戻り値
boolean waitTime が期限切れになる前に外部ストアがマウントされている場合はtrue 。それ以外の場合はfalse