DeviceFlashPreparer
public abstract class DeviceFlashPreparer
extends BaseTargetPreparer
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceFlashPreparer |
一个ITargetPreparer
,用于在物理Android硬件上ITargetPreparer
图像。
概要
嵌套类 | |
---|---|
enum | DeviceFlashPreparer.EncryptionOptions 枚举用于处理用户数据图像加密的选项 |
公共建设者 | |
---|---|
DeviceFlashPreparer () |
公开方法 | |
---|---|
void | setUp (TestInformation testInfo) |
void | setUserDataFlashOption ( IDeviceFlasher.UserDataFlashOption flashOption) 设置userdata-flash选项 |
void | tearDown (TestInformation testInfo, Throwable e) |
受保护的方法 | |
---|---|
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 | setSkipPostFlashFlavorCheck (boolean skipPostFlashFlavorCheck) |
公共建设者
DeviceFlashPreparer
public DeviceFlashPreparer ()
公开方法
建立
public void setUp (TestInformation testInfo)
参量 | |
---|---|
testInfo | TestInformation |
投掷 | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
setUserDataFlashOption
public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)
设置userdata-flash选项
拆除
public void tearDown (TestInformation testInfo, Throwable e)
参量 | |
---|---|
testInfo | TestInformation |
e | Throwable |
投掷 | |
---|---|
DeviceNotAvailableException |
受保护的方法
checkDeviceProductType
protected void checkDeviceProductType (ITestDevice device, IDeviceBuildInfo deviceBuild)
进行闪烁之前可能的检查,以确保设备与预期的相比与构建信息相符。
参量 | |
---|---|
device | ITestDevice :要闪烁的ITestDevice 。 |
deviceBuild | IDeviceBuildInfo :用于闪烁的IDeviceBuildInfo 。 |
投掷 | |
---|---|
| com.android.tradefed.targetprep.BuildError |
DeviceNotAvailableException | |
BuildError |
createFlasher
protected abstract IDeviceFlasher createFlasher (ITestDevice device)
创建要使用的IDeviceFlasher
。子类可以覆盖
参量 | |
---|---|
device | ITestDevice |
退货 | |
---|---|
IDeviceFlasher |
投掷 | |
---|---|
DeviceNotAvailableException |
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
获取设备启动等待时间
退货 | |
---|---|
long |
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 |
setSkipPostFlashFlavorCheck
protected void setSkipPostFlashFlavorCheck (boolean skipPostFlashFlavorCheck)
参量 | |
---|---|
skipPostFlashFlavorCheck | boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.