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 urządzeniu z Androidem.
Podsumowanie
Publiczne konstruktory | |
|---|---|
DeviceFlashPreparer()
|
|
Metody publiczne | |
|---|---|
void
|
addAllowedBranchForTransitionInIncremental(String branch)
|
void
|
addBranchTransitionInIncremental(String origin, String destination)
|
void
|
addFlasherExtraMetadata(
|
IBuildInfo
|
getBuild(TestInformation testInfo)
Zawiń funkcję getBuildInfo, aby można było ją zastąpić 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)
Wstawia używany element |
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)
|
Metody chronione | |
|---|---|
boolean
|
checkAntiRollback(IDeviceFlasher flasher, ITestDevice device, IDeviceBuildInfo deviceBuild)
|
void
|
checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)
Możliwość sprawdzenia przed flashowaniem, czy urządzenie jest zgodne z informacjami o 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)
Raportuje dane o czasie migania urządzenia do backendu danych |
void
|
setSkipPostFlashBuildIdCheck(boolean skipPostFlashBuildIdCheck)
|
void
|
setUseIncrementalFlashing(boolean incrementalFlashing)
|
Publiczne konstruktory
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 |
addFlasherExtraMetadata
public void addFlasherExtraMetadata (metadata)
| Parametry | |
|---|---|
metadata |
|
getBuild
public IBuildInfo getBuild (TestInformation testInfo)
Zawiń funkcję getBuildInfo, aby można było ją zastąpić 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)
Wstawia używany element IConfiguration.
| 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 |
| Zgłasza | |
|---|---|
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 |
| Zgłasza | |
|---|---|
DeviceNotAvailableException |
|
useMerkleTreeComparison
public void useMerkleTreeComparison (boolean enableMerkleTreeComparison)
| Parametry | |
|---|---|
enableMerkleTreeComparison |
boolean |
Metody chronione
checkAntiRollback
protected boolean checkAntiRollback (IDeviceFlasher flasher, ITestDevice device, IDeviceBuildInfo deviceBuild)
| Parametry | |
|---|---|
flasher |
IDeviceFlasher |
device |
ITestDevice |
deviceBuild |
IDeviceBuildInfo |
| Zwroty | |
|---|---|
boolean |
|
| Zgłasza | |
|---|---|
DeviceNotAvailableException |
|
checkDeviceProductType
protected void checkDeviceProductType (ITestDevice device, IDeviceBuildInfo deviceBuild)
Możliwość sprawdzenia przed flashowaniem, czy urządzenie jest zgodne z informacjami o kompilacji.
| Parametry | |
|---|---|
device |
ITestDevice: ITestDevice. |
deviceBuild |
IDeviceBuildInfo: IDeviceBuildInfo użyty do błysku. |
| Zgłasza | |
|---|---|
|
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ępować tę metodę.
| Parametry | |
|---|---|
device |
ITestDevice |
| Zwroty | |
|---|---|
IDeviceFlasher |
|
| Zgłasza | |
|---|---|
|
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ępniono do testowania jednostkowego
| Zwroty | |
|---|---|
IHostOptions |
|
reportFlashMetrics
protected void reportFlashMetrics (String branch,
String buildFlavor,
String buildId,
String serial,
long queueTime,
long flashingTime,
CommandStatus flashingStatus)Raportuje dane o czasie migania urządzenia do backendu danych
| Parametry | |
|---|---|
branch |
String: gałąź, z której pochodzi kompilacja urządzenia. |
buildFlavor |
String: wersja kompilacji urządzenia. |
buildId |
String: numer kompilacji urządzenia, |
serial |
String: numer seryjny urządzenia; |
queueTime |
long: czas oczekiwania na udostępnienie limitu migającego; |
flashingTime |
long: czas spędzony na instalowaniu obrazu urządzenia z pliku 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 |