Trình chuẩn bị thiết bịFlash
public abstract class DeviceFlashPreparer
extends BaseTargetPreparer
implements IConfigurationReceiver
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.DeviceFlashPreparer |
ITargetPreparer
hiển thị hình ảnh trên phần cứng vật lý của Android.
Bản tóm tắt
Nhà thầu xây dựng công cộng | |
---|---|
DeviceFlashPreparer () |
Phương pháp công khai | |
---|---|
void | setConfiguration ( IConfiguration configuration) Tiêm |
void | setUp ( TestInformation testInfo) |
void | setUserDataFlashOption ( IDeviceFlasher.UserDataFlashOption flashOption) Đặt tùy chọn userdata-flash |
void | tearDown ( TestInformation testInfo, Throwable e) |
Phương pháp được bảo vệ | |
---|---|
void | checkDeviceProductType ( ITestDevice device, IDeviceBuildInfo deviceBuild) Có thể kiểm tra trước khi flash để đảm bảo thiết bị hoạt động như mong đợi so với thông tin bản dựng. |
abstract IDeviceFlasher | createFlasher ( ITestDevice device) Tạo |
long | getDeviceBootWaitTime () Lấy thời gian chờ khởi động thiết bị |
IHostOptions | getHostOptions () Lấy phiên bản |
void | reportFlashMetrics (String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus) Báo cáo dữ liệu thời gian nhấp nháy của thiết bị tới chương trình phụ trợ số liệu |
void | setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck) |
void | setUseIncrementalFlashing (boolean incrementalFlashing) |
Nhà thầu xây dựng công cộng
Trình chuẩn bị thiết bịFlash
public DeviceFlashPreparer ()
Phương pháp công khai
setConfiguration
public void setConfiguration (IConfiguration configuration)
Tiêm IConfiguration
đang sử dụng.
Thông số | |
---|---|
configuration | IConfiguration |
cài đặt
public void setUp (TestInformation testInfo)
Thông số | |
---|---|
testInfo | TestInformation |
Ném | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
setUserDataFlashOption
public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)
Đặt tùy chọn userdata-flash
phá bỏ
public void tearDown (TestInformation testInfo, Throwable e)
Thông số | |
---|---|
testInfo | TestInformation |
e | Throwable |
Ném | |
---|---|
DeviceNotAvailableException |
Phương pháp được bảo vệ
kiểm traThiết bịLoại sản phẩm
protected void checkDeviceProductType (ITestDevice device, IDeviceBuildInfo deviceBuild)
Có thể kiểm tra trước khi flash để đảm bảo thiết bị hoạt động như mong đợi so với thông tin bản dựng.
Thông số | |
---|---|
device | ITestDevice : ITestDevice cần flash. |
deviceBuild | IDeviceBuildInfo : IDeviceBuildInfo dùng để flash. |
Ném | |
---|---|
| com.android.tradefed.targetprep.BuildError |
| com.android.tradefed.device.DeviceNotAvailableException |
BuildError | |
DeviceNotAvailableException |
tạoFlasher
protected abstract IDeviceFlasher createFlasher (ITestDevice device)
Tạo IDeviceFlasher
để sử dụng. Các lớp con có thể ghi đè
Thông số | |
---|---|
device | ITestDevice |
Trả lại | |
---|---|
IDeviceFlasher |
Ném | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
Lấy thời gian chờ khởi động thiết bị
Trả lại | |
---|---|
long |
gethostOptions
protected IHostOptions getHostOptions ()
Lấy phiên bản IHostOptions
để sử dụng.
Trả lại | |
---|---|
IHostOptions |
báo cáoFlashMetrics
protected void reportFlashMetrics (String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)
Báo cáo dữ liệu thời gian nhấp nháy của thiết bị tới chương trình phụ trợ số liệu
Thông số | |
---|---|
branch | String : nhánh nơi bắt nguồn của quá trình xây dựng thiết bị |
buildFlavor | String : hương vị xây dựng của bản dựng thiết bị |
buildId | String : số bản dựng của bản dựng thiết bị |
serial | String : số serial của thiết bị |
queueTime | long : thời gian chờ đợi giới hạn nhấp nháy có sẵn |
flashingTime | long : thời gian dành cho việc nhấp nháy hình ảnh zip của thiết bị |
flashingStatus | CommandStatus : trạng thái thực thi lệnh nhấp nháy |
setSkipPostFlashBuildIdCheck
protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)
Thông số | |
---|---|
skipPostFlashBuildIdCheck | boolean |
setUseIncrementalNhấp nháy
protected void setUseIncrementalFlashing (boolean incrementalFlashing)
Thông số | |
---|---|
incrementalFlashing | boolean |