NativeDeviceStateMonitor
public class NativeDeviceStateMonitor
extends Object
implements IDeviceStateMonitor
java.lang.オブジェクト |
↳ | com.android.tradefed.device.NativeDeviceStateMonitor |
フレームワークをサポートしていないIDevice
の状態を監視するためのヘルパー クラス。
まとめ
定数
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 ()
getFastbootSerialNumber
public String getFastbootSerialNumber ()
マウントポイントの取得
public String getMountPoint (String mountName)
getシリアル番号
public String getSerialNumber ()
isAdbTcp
public boolean isAdbTcp ()
setDefaultAvailableTimeout
public void setDefaultAvailableTimeout (long timeoutMs)
waitForDeviceAvailable()
でデバイスが使用可能になるまで待機する時間をミリ秒単位で設定します。
setDefaultOnlineTimeout
public void setDefaultOnlineTimeout (long timeoutMs)
waitForDeviceOnline()
でデバイスがオンラインになるまで待機する時間をミリ秒単位で設定します。
setFastbootSerialNumber
public void setFastbootSerialNumber (String serial)
fastboot モードのシリアル番号を設定します。
setIDevice
public void setIDevice (IDevice newDevice)
setState
public void setState (TestDeviceState deviceState)
パラメーター |
---|
deviceState | TestDeviceState |
ブート完了を待つ
public boolean waitForBootComplete (long waitTime)
デバイスが利用可能になるまで待機します
public IDevice waitForDeviceAvailable (long waitTime)
デバイスが利用可能になるまで待機します
public IDevice waitForDeviceAvailable ()
デバイスブートローダーの待機
public boolean waitForDeviceBootloader (long time)
waitForDeviceBootloaderStateUpdate
public void waitForDeviceBootloaderStateUpdate ()
waitForDeviceFastbootd
public boolean waitForDeviceFastbootd (String fastbootPath,
long time)
パラメーター |
---|
fastbootPath | String |
time | long |
デバイスの回復を待つ
public IDevice waitForDeviceInRecovery ()
デバイスの回復を待つ
public boolean waitForDeviceInRecovery (long waitTime)
デバイスインサイドロードを待つ
public boolean waitForDeviceInSideload (long waitTime)
デバイスが利用できないのを待ちます
public boolean waitForDeviceNotAvailable (long waitTime)
デバイスオンラインで待つ
public IDevice waitForDeviceOnline ()
デバイスオンラインで待つ
public IDevice waitForDeviceOnline (long waitTime)
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
保護されたメソッド
createOutputReceiver
protected CollectingOutputReceiver createOutputReceiver ()
テストのために暴露された
getCheckPollTime
protected long getCheckPollTime ()
テストのために暴露された
現在の時刻を取得する
protected long getCurrentTime ()
テストのために暴露された
getIDevice
protected IDevice getIDevice ()
投稿オンラインチェック
protected boolean postOnlineCheck (long waitTime)
オンラインデバイスで実行する追加のチェック
パラメーター |
---|
waitTime | long : 諦めるまでの待機時間 (ミリ秒) |
戻り値 |
---|
boolean | waitTime が期限切れになる前にチェックが成功した場合はtrue 。それ以外の場合はfalse |
ストアマウントを待つ
protected boolean waitForStoreMount (long waitTime)
デバイスの外部ストアがマウントされるのを待ちます。
パラメーター |
---|
waitTime | long : 諦めるまでの待機時間 (ミリ秒) |
戻り値 |
---|
boolean | waitTime が期限切れになる前に外部ストアがマウントされている場合はtrue 。それ以外の場合はfalse |