Google is committed to advancing racial equity for Black communities. See how.
本頁面由 Cloud Translation API 翻譯而成。
Switch to English

WaitDeviceRecovery

public class WaitDeviceRecovery
extends Object implements IDeviceRecovery

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


IDeviceRecovery簡單實現,它等待設備在線並響應簡單的命令。

概要

常數

int BOOTLOADER_POLL_ATTEMPTS

嘗試檢查設備是否在引導程序中的次數。

long INITIAL_PAUSE_TIME

開始恢復嘗試之前等待的時間(以毫秒為單位)

領域

protected long mBootloaderWaitTime

protected boolean mDisableUnresponsiveReboot

protected long mFastbootWaitTime

protected long mOnlineWaitTime

protected int mRequiredMinBattery

protected long mShellWaitTime

protected long mWaitTime

公共建設者

WaitDeviceRecovery ()

公開方法

void recoverDevice (IDeviceStateMonitor monitor, boolean recoverUntilOnline)

void recoverDeviceBootloader (IDeviceStateMonitor monitor)

void recoverDeviceFastbootd (IDeviceStateMonitor monitor)

void recoverDeviceRecovery (IDeviceStateMonitor monitor)

void setFastbootPath (String fastbootPath)

受保護的方法

void checkMinBatteryLevel (IDevice device)

檢查設備電池電量是否滿足最低要求

IRunUtil getRunUtil ()

獲取要使用的RunUtil實例。

void handleDeviceNotAvailable (IDeviceStateMonitor monitor, boolean recoverTillOnline)

處理設備不可用的情況。

void handleDeviceUnresponsive (IDevice device, IDeviceStateMonitor monitor)

處理設備在線但無響應的情況。

常數

BOOTLOADER_POLL_ATTEMPTS

public static final int BOOTLOADER_POLL_ATTEMPTS

嘗試檢查設備是否在引導程序中的次數。

公開進行單元測試

常數值:3(0x00000003)

INITIAL_PAUSE_TIME

protected static final long INITIAL_PAUSE_TIME

開始恢復嘗試之前等待的時間(以毫秒為單位)

常數值:5000(0x0000000000001388)

領域

mBootloaderWaitTime

protected long mBootloaderWaitTime

mDisableUnsensitiveReboot

protected boolean mDisableUnresponsiveReboot

mFastbootWaitTime

protected long mFastbootWaitTime

mOnlineWaitTime

protected long mOnlineWaitTime

mRequiredMinBattery

protected int mRequiredMinBattery

mShellWaitTime

protected long mShellWaitTime

等待時間

protected long mWaitTime

公共建設者

WaitDeviceRecovery

public WaitDeviceRecovery ()

公開方法

restoreDevice

public void recoverDevice (IDeviceStateMonitor monitor, 
                boolean recoverUntilOnline)

參量
monitor IDeviceStateMonitor

recoverUntilOnline boolean

投擲
DeviceNotAvailableException

recoveryDeviceBootloader

public void recoverDeviceBootloader (IDeviceStateMonitor monitor)

參量
monitor IDeviceStateMonitor

投擲
DeviceNotAvailableException

recoveryDeviceFastbootd

public void recoverDeviceFastbootd (IDeviceStateMonitor monitor)

參量
monitor IDeviceStateMonitor

投擲
DeviceNotAvailableException

recoveryDeviceRecovery

public void recoverDeviceRecovery (IDeviceStateMonitor monitor)

參量
monitor IDeviceStateMonitor

投擲
DeviceNotAvailableException

setFastbootPath

public void setFastbootPath (String fastbootPath)

參量
fastbootPath String

受保護的方法

checkMinBatteryLevel

protected void checkMinBatteryLevel (IDevice device)

檢查設備電池電量是否滿足最低要求

投擲
DeviceNotAvailableException如果無法讀取電池電量或低於最低電量

getRunUtil

protected IRunUtil getRunUtil ()

獲取要使用的RunUtil實例。

公開進行單元測試。

退貨
IRunUtil

handleDeviceNotAvailable

protected void handleDeviceNotAvailable (IDeviceStateMonitor monitor, 
                boolean recoverTillOnline)

處理設備不可用的情況。

參量
monitor IDeviceStateMonitorIDeviceStateMonitor

recoverTillOnline boolean :如果為true,則此方法應在設備在線時返回,並且不檢查響應性

投擲
DeviceNotAvailableException

handleDeviceUn響應

protected void handleDeviceUnresponsive (IDevice device, 
                IDeviceStateMonitor monitor)

處理設備在線但無響應的情況。

參量
device IDevice

投擲
DeviceNotAvailableException