WaitDeviceRecovery

public class WaitDeviceRecovery
extends Object implements IDeviceRecovery

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


การใช้งาน IDeviceRecovery ที่รอให้อุปกรณ์ออนไลน์และตอบสนองต่อคําสั่งง่ายๆ

สรุป

ค่าคงที่

int BOOTLOADER_POLL_ATTEMPTS

จำนวนครั้งที่พยายามตรวจสอบว่าอุปกรณ์อยู่ใน Bootloader หรือไม่

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

จำนวนครั้งที่พยายามตรวจสอบว่าอุปกรณ์อยู่ใน Bootloader หรือไม่

แสดงสำหรับการทดสอบ 1 หน่วย

ค่าคงที่: 3 (0x00000003)

INITIAL_PAUSE_TIME

protected static final long INITIAL_PAUSE_TIME

ระยะเวลาเป็นมิลลิวินาทีที่จะรอก่อนที่จะเริ่มพยายามกู้คืน

ค่าคงที่: 5000 (0x0000000000001388)

ช่อง

mBootloaderWaitTime

protected long mBootloaderWaitTime

mDisableUnresponsiveReboot

protected boolean mDisableUnresponsiveReboot

mFastbootWaitTime

protected long mFastbootWaitTime

mOnlineWaitTime

protected long mOnlineWaitTime

mRequiredMinBattery

protected int mRequiredMinBattery

mShellWaitTime

protected long mShellWaitTime

mWaitTime

protected long mWaitTime

ตัวสร้างแบบสาธารณะ

WaitDeviceRecovery

public WaitDeviceRecovery ()

เมธอดสาธารณะ

recoverDevice

public void recoverDevice (IDeviceStateMonitor monitor, 
                boolean recoverUntilOnline)

พารามิเตอร์
monitor IDeviceStateMonitor

recoverUntilOnline boolean

การโยน
DeviceNotAvailableException

recoverDeviceBootloader

public void recoverDeviceBootloader (IDeviceStateMonitor monitor)

พารามิเตอร์
monitor IDeviceStateMonitor

การโยน
DeviceNotAvailableException

recoverDeviceFastbootd

public void recoverDeviceFastbootd (IDeviceStateMonitor monitor)

พารามิเตอร์
monitor IDeviceStateMonitor

การโยน
DeviceNotAvailableException

recoverDeviceRecovery

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 IDeviceStateMonitor: IDeviceStateMonitor

recoverTillOnline boolean: if true this method should return if device is online, and not checked for responsiveness

การโยน
DeviceNotAvailableException

handleDeviceUnresponsive

protected void handleDeviceUnresponsive (IDevice device, 
                IDeviceStateMonitor monitor)

จัดการสถานการณ์ที่อุปกรณ์ออนไลน์อยู่แต่ไม่ตอบสนอง

พารามิเตอร์
device IDevice

การโยน
DeviceNotAvailableException