Trình chuẩn bị thiết bịFlash
public abstract class DeviceFlashPreparer
extends BaseTargetPreparer
implements IConfigurationReceiver
Các lớp con trực tiếp đã biết |
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
Trình chuẩn bị thiết bịFlash
public DeviceFlashPreparer ()
Phương pháp công khai
public IBuildInfo getBuild (TestInformation testInfo)
Hãy gói getBuildInfo để chúng tôi có thay đổi ghi đè lên nó cho các trường hợp cụ thể.
Thông số |
---|
testInfo | TestInformation |
isIncrementalFlashingEnabled
public boolean isIncrementalFlashingEnabled ()
isIncrementalFlashingForceDisabled
public boolean isIncrementalFlashingForceDisabled ()
setAllowCrossReleaseNhấp nháy
public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
Thông số |
---|
allowCrossReleaseFlashing | boolean |
setAllowUnzipBaseline
public void setAllowUnzipBaseline (boolean allowUnzipBaseline)
Thông số |
---|
allowUnzipBaseline | boolean |
setÁp dụngSnapshot
public void setApplySnapshot (boolean applySnapshot)
Thông số |
---|
applySnapshot | boolean |
setConfiguration
public void setConfiguration (IConfiguration configuration)
Tiêm IConfiguration
đang sử dụng.
Thông số |
---|
configuration | IConfiguration |
public void setUp (TestInformation testInfo)
Thông số |
---|
testInfo | TestInformation |
public void tearDown (TestInformation testInfo,
Throwable e)
Thông số |
---|
testInfo | TestInformation |
e | Throwable |
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.
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
Lấy thời gian chờ khởi động thiết bị
gethostOptions
protected IHostOptions getHostOptions ()
Lấy phiên bản IHostOptions
để sử dụng.
Tiếp xúc để thử nghiệm đơn vị
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 |