DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.DeviceFlashPreparer


ITargetPreparer ที่กะพริบรูปภาพบนฮาร์ดแวร์ Android

สรุป

ชั้นเรียนที่ซ้อนกัน

enum DeviceFlashPreparer.EncryptionOptions

Enum ของตัวเลือกสำหรับการจัดการการเข้ารหัสรูปภาพข้อมูลผู้ใช้  

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

DeviceFlashPreparer()

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

void setUp(TestInformation testInfo)

void setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)

ตั้งค่าตัวเลือก userdata-flash

void tearDown(TestInformation testInfo, Throwable e)

วิธีการที่มีการป้องกัน

void checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)

ตรวจสอบก่อนแฟลชเพื่อให้แน่ใจว่าอุปกรณ์ทำงานได้ตามที่คาดไว้เมื่อเทียบกับข้อมูลบิลด์

abstract IDeviceFlasher createFlasher(ITestDevice device)

สร้าง IDeviceFlasher เพื่อใช้งาน

long getDeviceBootWaitTime()

รับเวลารอการบูตของอุปกรณ์

IHostOptions getHostOptions()

รับอินสแตนซ์ IHostOptions เพื่อใช้งาน

void reportFlashMetrics(String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)

รายงานข้อมูลเวลากะพริบของอุปกรณ์ไปยังแบ็กเอนด์เมตริก

void setSkipPostFlashBuildIdCheck(boolean skipPostFlashBuildIdCheck)
void setSkipPostFlashFlavorCheck(boolean skipPostFlashFlavorCheck)

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

DeviceFlashPreparer

public DeviceFlashPreparer ()

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

setUp

public void setUp (TestInformation testInfo)

พารามิเตอร์
testInfo TestInformation

การโยน
BuildError
DeviceNotAvailableException
TargetSetupError

setUserDataFlashOption

public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

ตั้งค่าตัวเลือก userdata-flash

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

พารามิเตอร์
testInfo TestInformation

e Throwable

การโยน
DeviceNotAvailableException

วิธีการที่มีการป้องกัน

checkDeviceProductType

protected void checkDeviceProductType (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

ตรวจสอบก่อนแฟลชเพื่อให้แน่ใจว่าอุปกรณ์ทำงานได้ตามที่คาดไว้เมื่อเทียบกับข้อมูลบิลด์

พารามิเตอร์
device ITestDevice: ITestDevice ให้กะพริบ

deviceBuild IDeviceBuildInfo: IDeviceBuildInfo ที่ใช้ในการแฟลช

การโยน
com.android.tradefed.targetprep.BuildError
DeviceNotAvailableException
BuildError

createFlasher

protected abstract IDeviceFlasher createFlasher (ITestDevice device)

สร้าง IDeviceFlasher เพื่อใช้งาน คลาสย่อยจะลบล้างได้

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

คิกรีเทิร์น
IDeviceFlasher

การโยน
DeviceNotAvailableException

getDeviceBootWaitTime

protected long getDeviceBootWaitTime ()

รับเวลารอการบูตของอุปกรณ์

คิกรีเทิร์น
long

getHostOptions

protected IHostOptions getHostOptions ()

รับอินสแตนซ์ IHostOptions เพื่อใช้งาน

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

คิกรีเทิร์น
IHostOptions

reportFlashMetrics

protected void reportFlashMetrics (String branch, 
                String buildFlavor, 
                String buildId, 
                String serial, 
                long queueTime, 
                long flashingTime, 
                CommandStatus flashingStatus)

รายงานข้อมูลเวลากะพริบของอุปกรณ์ไปยังแบ็กเอนด์เมตริก

พารามิเตอร์
branch String: Branch ที่สร้างบิลด์อุปกรณ์

buildFlavor String: รูปแบบบิลด์ของบิลด์อุปกรณ์

buildId String: หมายเลขบิลด์ของบิลด์อุปกรณ์

serial String: หมายเลขซีเรียลของอุปกรณ์

queueTime long: เวลาที่ใช้ในการรอให้ขีดจำกัดที่กะพริบพร้อมใช้งาน

flashingTime long: เวลาที่ใช้ในการแฟลชไฟล์ ZIP รูปภาพของอุปกรณ์

flashingStatus CommandStatus: สถานะการเรียกใช้คำสั่งแฟลช

setSkipPostFlashBuildIdCheck

protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)

พารามิเตอร์
skipPostFlashBuildIdCheck boolean

setSkipPostFlashFlavorCheck

protected void setSkipPostFlashFlavorCheck (boolean skipPostFlashFlavorCheck)

พารามิเตอร์
skipPostFlashFlavorCheck boolean