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)
      
      
     | 
  
        
        
        
        
        
        IBuildInfo
     | 
  
    
      
      getBuild(TestInformation testInfo)
      
      
        ตัด getBuildInfo ออกเพื่อให้เราเปลี่ยนแปลงเพื่อลบล้างสำหรับบางสถานการณ์ได้  | 
  
        
        
        
        
        
        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)
      
      
     | 
  
วิธีการที่มีการป้องกัน | |
|---|---|
        
        
        
        
        
        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  | 
      
getBuild
public IBuildInfo getBuild (TestInformation testInfo)
ตัด getBuildInfo ออกเพื่อให้เราเปลี่ยนแปลงเพื่อลบล้างสำหรับบางสถานการณ์ได้
| พารามิเตอร์ | |
|---|---|
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  | 
      
วิธีการที่มีการป้องกัน
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 เพื่อใช้งาน
 
แสดงสำหรับการทดสอบ 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  | 
      
setUseIncrementalFlashing
protected void setUseIncrementalFlashing (boolean incrementalFlashing)
| พารามิเตอร์ | |
|---|---|
incrementalFlashing | 
        
          boolean  |