อุปกรณ์ FlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer implements IConfigurationReceiver

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


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

สรุป

ผู้รับเหมาก่อสร้างสาธารณะ

DeviceFlashPreparer ()

วิธีการสาธารณะ

IBuildInfo getBuild ( TestInformation testInfo)

รวม getBuildInfo เพื่อให้เรามีการเปลี่ยนแปลงเพื่อแทนที่มันสำหรับสถานการณ์เฉพาะ

boolean isIncrementalFlashingEnabled ()
boolean isIncrementalFlashingForceDisabled ()
void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
void setConfiguration ( IConfiguration configuration)

แทรก IConfiguration ที่ใช้งานอยู่

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 setUseIncrementalFlashing (boolean incrementalFlashing)

ผู้รับเหมาก่อสร้างสาธารณะ

อุปกรณ์ FlashPreparer

public DeviceFlashPreparer ()

วิธีการสาธารณะ

รับสร้าง

public IBuildInfo getBuild (TestInformation testInfo)

รวม getBuildInfo เพื่อให้เรามีการเปลี่ยนแปลงเพื่อแทนที่มันสำหรับสถานการณ์เฉพาะ

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

การส่งคืน
IBuildInfo

คือเปิดใช้งานแบบFlashingแบบเพิ่มหน่วยแล้ว

public boolean isIncrementalFlashingEnabled ()

การส่งคืน
boolean

คือIncreamentalFlashingForceDisabled

public boolean isIncrementalFlashingForceDisabled ()

การส่งคืน
boolean

setAllowCrossReleaseFlashing

public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)

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

ตั้งค่าคอนฟิก

public void setConfiguration (IConfiguration configuration)

แทรก IConfiguration ที่ใช้งานอยู่

พารามิเตอร์
configuration IConfiguration

ติดตั้ง

public void setUp (TestInformation testInfo)

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

ขว้าง
BuildError
DeviceNotAvailableException
TargetSetupError

setUserDataFlashOption

public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

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

การถอดออก

public void tearDown (TestInformation testInfo, 
                Throwable e)

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

e Throwable

ขว้าง
DeviceNotAvailableException

วิธีการที่ได้รับการป้องกัน

ตรวจสอบDeviceProductType

protected void checkDeviceProductType (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

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

พารามิเตอร์
device ITestDevice : ITestDevice ที่จะแฟลช

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

ขว้าง
com.android.tradefed.targetprep.BuildError
com.android.tradefed.device.DeviceNotAvailableException
BuildError
DeviceNotAvailableException

createFlasher

protected abstract IDeviceFlasher createFlasher (ITestDevice device)

สร้าง IDeviceFlasher เพื่อใช้งาน คลาสย่อยสามารถแทนที่ได้

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

การส่งคืน
IDeviceFlasher

ขว้าง
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

รับDeviceBootWaitTime

protected long getDeviceBootWaitTime ()

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

การส่งคืน
long

getHostOptions

protected IHostOptions getHostOptions ()

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

เปิดเผยสำหรับการทดสอบหน่วย

การส่งคืน
IHostOptions

รายงาน FlashMetrics

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

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

พารามิเตอร์
branch String : สาขาที่กำเนิดอุปกรณ์

buildFlavor String : รสชาติบิลด์ของบิลด์อุปกรณ์

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

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

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

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

flashingStatus CommandStatus : สถานะการดำเนินการของคำสั่งที่กระพริบ

setSkipPostFlashBuildIdCheck

protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)

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

setUseIncreationalFlashing

protected void setUseIncrementalFlashing (boolean incrementalFlashing)

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