DeviceFlashPreparer
public
abstract
class
DeviceFlashPreparer
extends BaseTargetPreparer
implements
IConfigurationReceiver,
ITestLoggerReceiver
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.DeviceFlashPreparer | |
ITargetPreparer ที่แสดงรูปภาพบนฮาร์ดแวร์ Android จริง
สรุป
เครื่องมือสร้างสาธารณะ | |
|---|---|
DeviceFlashPreparer()
|
|
เมธอดสาธารณะ | |
|---|---|
void
|
addAllowedBranchForTransitionInIncremental(String branch)
|
void
|
addBranchTransitionInIncremental(String origin, String destination)
|
void
|
addFlasherExtraMetadata(
|
IBuildInfo
|
getBuild(TestInformation testInfo)
Wrap the getBuildInfo so we have a change to override it for specific scenarios. |
ITestLogger
|
getTestLogger()
|
boolean
|
isIncrementalFlashingEnabled()
|
boolean
|
isIncrementalFlashingForceDisabled()
|
void
|
setAllowCrossReleaseFlashing(boolean allowCrossReleaseFlashing)
|
void
|
setAllowUnzipBaseline(boolean allowUnzipBaseline)
|
void
|
setApplySnapshot(boolean applySnapshot)
|
void
|
setConfiguration(IConfiguration configuration)
แทรก |
void
|
setIgnoreHostOptions(boolean ignoreHostOptions)
|
void
|
setTestLogger(ITestLogger testLogger)
แทรกอินสแตนซ์ |
void
|
setUp(TestInformation testInfo)
|
void
|
setUpdateBootloaderFromUserspace(boolean updateBootloaderFromUserspace)
|
void
|
setUseIncrementalNewFlow(boolean useIncrementalNewFlow)
|
void
|
setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)
ตั้งค่าตัวเลือก userdata-flash |
void
|
setWipeAfterApplySnapshot(boolean wipeAfterApplySnapshot)
|
void
|
tearDown(TestInformation testInfo, Throwable e)
|
void
|
useMerkleTreeComparison(boolean enableMerkleTreeComparison)
|
วิธีการที่ได้รับการป้องกัน | |
|---|---|
boolean
|
checkAntiRollback(IDeviceFlasher flasher, ITestDevice device, IDeviceBuildInfo deviceBuild)
|
void
|
checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)
การตรวจสอบที่อาจทำได้ก่อนแฟลชเพื่อให้แน่ใจว่าอุปกรณ์เป็นไปตามที่คาดไว้เมื่อเทียบกับข้อมูลบิลด์ |
abstract
IDeviceFlasher
|
createFlasher(ITestDevice device)
สร้าง |
long
|
getDeviceBootWaitTime()
รับเวลาการรอการบูตของอุปกรณ์ |
IHostOptions
|
getHostOptions()
รับอินสแตนซ์ |
void
|
reportFlashMetrics(String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)
รายงานข้อมูลเวลาการแฟลชอุปกรณ์ไปยังแบ็กเอนด์ของเมตริก |
void
|
setSkipPostFlashBuildIdCheck(boolean skipPostFlashBuildIdCheck)
|
void
|
setUseIncrementalFlashing(boolean incrementalFlashing)
|
เครื่องมือสร้างสาธารณะ
DeviceFlashPreparer
public DeviceFlashPreparer ()
เมธอดสาธารณะ
addAllowedBranchForTransitionInIncremental
public void addAllowedBranchForTransitionInIncremental (String branch)
| พารามิเตอร์ | |
|---|---|
branch |
String |
addBranchTransitionInIncremental
public void addBranchTransitionInIncremental (String origin,
String destination)| พารามิเตอร์ | |
|---|---|
origin |
String |
destination |
String |
addFlasherExtraMetadata
public void addFlasherExtraMetadata (metadata)
| พารามิเตอร์ | |
|---|---|
metadata |
|
getBuild
public IBuildInfo getBuild (TestInformation testInfo)
Wrap the getBuildInfo so we have a change to override it for specific scenarios.
| พารามิเตอร์ | |
|---|---|
testInfo |
TestInformation |
| คิกรีเทิร์น | |
|---|---|
IBuildInfo |
|
isIncrementalFlashingEnabled
public boolean isIncrementalFlashingEnabled ()
| คิกรีเทิร์น | |
|---|---|
boolean |
|
isIncrementalFlashingForceDisabled
public boolean isIncrementalFlashingForceDisabled ()
| คิกรีเทิร์น | |
|---|---|
boolean |
|
setAllowCrossReleaseFlashing
public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
| พารามิเตอร์ | |
|---|---|
allowCrossReleaseFlashing |
boolean |
setAllowUnzipBaseline
public void setAllowUnzipBaseline (boolean allowUnzipBaseline)
| พารามิเตอร์ | |
|---|---|
allowUnzipBaseline |
boolean |
setApplySnapshot
public void setApplySnapshot (boolean applySnapshot)
| พารามิเตอร์ | |
|---|---|
applySnapshot |
boolean |
setConfiguration
public void setConfiguration (IConfiguration configuration)
แทรก IConfiguration ที่ใช้งานอยู่
| พารามิเตอร์ | |
|---|---|
configuration |
IConfiguration |
setIgnoreHostOptions
public void setIgnoreHostOptions (boolean ignoreHostOptions)
| พารามิเตอร์ | |
|---|---|
ignoreHostOptions |
boolean |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
แทรกอินสแตนซ์ ITestLogger
| พารามิเตอร์ | |
|---|---|
testLogger |
ITestLogger |
setUp
public void setUp (TestInformation testInfo)
| พารามิเตอร์ | |
|---|---|
testInfo |
TestInformation |
| การขว้าง | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
setUpdateBootloaderFromUserspace
public void setUpdateBootloaderFromUserspace (boolean updateBootloaderFromUserspace)
| พารามิเตอร์ | |
|---|---|
updateBootloaderFromUserspace |
boolean |
setUseIncrementalNewFlow
public void setUseIncrementalNewFlow (boolean useIncrementalNewFlow)
| พารามิเตอร์ | |
|---|---|
useIncrementalNewFlow |
boolean |
setUserDataFlashOption
public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)
ตั้งค่าตัวเลือก userdata-flash
setWipeAfterApplySnapshot
public void setWipeAfterApplySnapshot (boolean wipeAfterApplySnapshot)
| พารามิเตอร์ | |
|---|---|
wipeAfterApplySnapshot |
boolean |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| พารามิเตอร์ | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| การขว้าง | |
|---|---|
DeviceNotAvailableException |
|
useMerkleTreeComparison
public void useMerkleTreeComparison (boolean enableMerkleTreeComparison)
| พารามิเตอร์ | |
|---|---|
enableMerkleTreeComparison |
boolean |
วิธีการที่ได้รับการป้องกัน
checkAntiRollback
protected boolean checkAntiRollback (IDeviceFlasher flasher, ITestDevice device, IDeviceBuildInfo deviceBuild)
| พารามิเตอร์ | |
|---|---|
flasher |
IDeviceFlasher |
device |
ITestDevice |
deviceBuild |
IDeviceBuildInfo |
| คิกรีเทิร์น | |
|---|---|
boolean |
|
| การขว้าง | |
|---|---|
DeviceNotAvailableException |
|
checkDeviceProductType
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 |
|
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
รับเวลาการรอการบูตของอุปกรณ์
| คิกรีเทิร์น | |
|---|---|
long |
|
getHostOptions
protected IHostOptions getHostOptions ()
รับอินสแตนซ์ IHostOptions เพื่อใช้
แสดงสำหรับการทดสอบหน่วย
| คิกรีเทิร์น | |
|---|---|
IHostOptions |
|
reportFlashMetrics
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 |
setUseIncrementalFlashing
protected void setUseIncrementalFlashing (boolean incrementalFlashing)
| พารามิเตอร์ | |
|---|---|
incrementalFlashing |
boolean |