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.

סיכום

‫constructors ציבוריים

DeviceFlashPreparer()

‫methods ציבוריים

void addAllowedBranchForTransitionInIncremental(String branch)
void addBranchTransitionInIncremental(String origin, String destination)
void addFlasherExtraMetadata( metadata)
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)

הוספת IConfiguration בשימוש.

void setIgnoreHostOptions(boolean ignoreHostOptions)
void setTestLogger(ITestLogger testLogger)

החדרת המופע ITestLogger

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)

צריך ליצור 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)

Constructors ציבוריים

DeviceFlashPreparer

public DeviceFlashPreparer ()

‫methods ציבוריים

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)

עוטפים את הפונקציה getBuildInfo כדי שנוכל לבטל אותה בתרחישים ספציפיים.

פרמטרים
testInfo TestInformation

החזרות
IBuildInfo

getTestLogger

public ITestLogger getTestLogger ()

החזרות
ITestLogger

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: הענף שממנו נוצרת גרסת ה-build של המכשיר

buildFlavor String: הטעם של הגרסה של המכשיר

buildId String: מספר ה-Build של ה-Build של המכשיר

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