DeviceFlashPreparer
public
abstract
class
DeviceFlashPreparer
extends BaseTargetPreparer
implements
IConfigurationReceiver,
ITestLoggerReceiver
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.DeviceFlashPreparer | |
ITargetPreparer, który wyświetla obraz na fizycznym sprzęcie z Androidem.
Podsumowanie
Konstruktory publiczne | |
|---|---|
DeviceFlashPreparer()
|
|
Metody publiczne | |
|---|---|
void
|
addAllowedBranchForTransitionInIncremental(String branch)
|
void
|
addBranchTransitionInIncremental(String origin, String destination)
|
IBuildInfo
|
getBuild(TestInformation testInfo)
Owiń getBuildInfo, abyśmy mogli zastąpić go w określonych scenariuszach. |
ITestLogger
|
getTestLogger()
|
boolean
|
isIncrementalFlashingEnabled()
|
boolean
|
isIncrementalFlashingForceDisabled()
|
void
|
setAllowCrossReleaseFlashing(boolean allowCrossReleaseFlashing)
|
void
|
setAllowUnzipBaseline(boolean allowUnzipBaseline)
|
void
|
setApplySnapshot(boolean applySnapshot)
|
void
|
setConfiguration(IConfiguration configuration)
Wstrzykuje |
void
|
setIgnoreHostOptions(boolean ignoreHostOptions)
|
void
|
setTestLogger(ITestLogger testLogger)
Wstrzykuje instancję |
void
|
setUp(TestInformation testInfo)
|
void
|
setUpdateBootloaderFromUserspace(boolean updateBootloaderFromUserspace)
|
void
|
setUseIncrementalNewFlow(boolean useIncrementalNewFlow)
|
void
|
setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)
Ustawianie opcji userdata-flash |
void
|
setWipeAfterApplySnapshot(boolean wipeAfterApplySnapshot)
|
void
|
tearDown(TestInformation testInfo, Throwable e)
|
void
|
useMerkleTreeComparison(boolean enableMerkleTreeComparison)
|
Chronione metody | |
|---|---|
void
|
checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)
Przed flashowaniem można sprawdzić, czy urządzenie jest zgodne z informacjami z kompilacji. |
abstract
IDeviceFlasher
|
createFlasher(ITestDevice device)
Utwórz |
long
|
getDeviceBootWaitTime()
Pobiera czas oczekiwania na uruchomienie urządzenia |
IHostOptions
|
getHostOptions()
Pobiera instancję |
void
|
reportFlashMetrics(String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)
Przesyła dane o czasie migania urządzenia do backendu pomiarów |
void
|
setSkipPostFlashBuildIdCheck(boolean skipPostFlashBuildIdCheck)
|
void
|
setUseIncrementalFlashing(boolean incrementalFlashing)
|
Konstruktory publiczne
DeviceFlashPreparer
public DeviceFlashPreparer ()
Metody publiczne
addAllowedBranchForTransitionInIncremental
public void addAllowedBranchForTransitionInIncremental (String branch)
| Parametry | |
|---|---|
branch |
String |
addBranchTransitionInIncremental
public void addBranchTransitionInIncremental (String origin,
String destination)| Parametry | |
|---|---|
origin |
String |
destination |
String |
getBuild
public IBuildInfo getBuild (TestInformation testInfo)
Owiń getBuildInfo, abyśmy mogli zastąpić go w określonych scenariuszach.
| Parametry | |
|---|---|
testInfo |
TestInformation |
| Zwroty | |
|---|---|
IBuildInfo |
|
isIncrementalFlashingEnabled
public boolean isIncrementalFlashingEnabled ()
| Zwroty | |
|---|---|
boolean |
|
isIncrementalFlashingForceDisabled
public boolean isIncrementalFlashingForceDisabled ()
| Zwroty | |
|---|---|
boolean |
|
setAllowCrossReleaseFlashing
public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
| Parametry | |
|---|---|
allowCrossReleaseFlashing |
boolean |
setAllowUnzipBaseline
public void setAllowUnzipBaseline (boolean allowUnzipBaseline)
| Parametry | |
|---|---|
allowUnzipBaseline |
boolean |
setApplySnapshot
public void setApplySnapshot (boolean applySnapshot)
| Parametry | |
|---|---|
applySnapshot |
boolean |
setConfiguration
public void setConfiguration (IConfiguration configuration)
Wstrzykuje IConfiguration w użyciu.
| Parametry | |
|---|---|
configuration |
IConfiguration |
setIgnoreHostOptions
public void setIgnoreHostOptions (boolean ignoreHostOptions)
| Parametry | |
|---|---|
ignoreHostOptions |
boolean |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
Wstrzykuje instancję ITestLogger
| Parametry | |
|---|---|
testLogger |
ITestLogger |
setUp
public void setUp (TestInformation testInfo)
| Parametry | |
|---|---|
testInfo |
TestInformation |
| Rzuty | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
setUpdateBootloaderFromUserspace
public void setUpdateBootloaderFromUserspace (boolean updateBootloaderFromUserspace)
| Parametry | |
|---|---|
updateBootloaderFromUserspace |
boolean |
setUseIncrementalNewFlow
public void setUseIncrementalNewFlow (boolean useIncrementalNewFlow)
| Parametry | |
|---|---|
useIncrementalNewFlow |
boolean |
setUserDataFlashOption
public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)
Ustawianie opcji userdata-flash
setWipeAfterApplySnapshot
public void setWipeAfterApplySnapshot (boolean wipeAfterApplySnapshot)
| Parametry | |
|---|---|
wipeAfterApplySnapshot |
boolean |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| Parametry | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| Rzuty | |
|---|---|
DeviceNotAvailableException |
|
useMerkleTreeComparison
public void useMerkleTreeComparison (boolean enableMerkleTreeComparison)
| Parametry | |
|---|---|
enableMerkleTreeComparison |
boolean |
Chronione metody
checkDeviceProductType
protected void checkDeviceProductType (ITestDevice device, IDeviceBuildInfo deviceBuild)
Przed flashowaniem można sprawdzić, czy urządzenie jest zgodne z informacjami z kompilacji.
| Parametry | |
|---|---|
device |
ITestDevice: ITestDevice do migania. |
deviceBuild |
IDeviceBuildInfo: IDeviceBuildInfo użyte do błysku. |
| Rzuty | |
|---|---|
|
com.android.tradefed.targetprep.BuildError |
|
com.android.tradefed.device.DeviceNotAvailableException |
BuildError |
|
DeviceNotAvailableException |
|
createFlasher
protected abstract IDeviceFlasher createFlasher (ITestDevice device)
Utwórz IDeviceFlasher, aby go używać. Podklasy mogą zastąpić
| Parametry | |
|---|---|
device |
ITestDevice |
| Zwroty | |
|---|---|
IDeviceFlasher |
|
| Rzuty | |
|---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
|
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
Pobiera czas oczekiwania na uruchomienie urządzenia
| Zwroty | |
|---|---|
long |
|
getHostOptions
protected IHostOptions getHostOptions ()
Pobiera instancję IHostOptions do użycia.
Udostępnione do testowania jednostkowego
| Zwroty | |
|---|---|
IHostOptions |
|
reportFlashMetrics
protected void reportFlashMetrics (String branch,
String buildFlavor,
String buildId,
String serial,
long queueTime,
long flashingTime,
CommandStatus flashingStatus)Przesyła dane o czasie migania urządzenia do backendu pomiarów
| Parametry | |
|---|---|
branch |
String: gałąź, z której pochodzi kompilacja urządzenia |
buildFlavor |
String: wersja kompilacji urządzenia |
buildId |
String: numer kompilacji wersji urządzenia |
serial |
String: numer seryjny urządzenia |
queueTime |
long: czas oczekiwania na dostępność limitu błyskawicznego |
flashingTime |
long: czas poświęcony na flashowanie pliku obrazu urządzenia ZIP |
flashingStatus |
CommandStatus: stan wykonania polecenia migania |
setSkipPostFlashBuildIdCheck
protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)
| Parametry | |
|---|---|
skipPostFlashBuildIdCheck |
boolean |
setUseIncrementalFlashing
protected void setUseIncrementalFlashing (boolean incrementalFlashing)
| Parametry | |
|---|---|
incrementalFlashing |
boolean |