Google cam kết thúc đẩy công bằng chủng tộc cho Cộng đồng người da đen. Xem cách thực hiện.

Thiết BịĐèn FlashChuẩn Bị

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.DeviceFlashPreparer


Một ITargetPreparer nhấp nháy hình ảnh trên phần cứng Android vật lý.

Bản tóm tắt

nhà thầu công cộng

DeviceFlashPreparer ()

Phương thức công khai

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ị như mong đợi so với thông tin bản dựng.

abstract IDeviceFlasher createFlasher ( ITestDevice device)

Tạo IDeviceFlasher để sử dụng.

long getDeviceBootWaitTime ()

Nhận thời gian chờ khởi động thiết bị

IHostOptions getHostOptions ()

Nhận phiên bản IHostOptions để sử dụng.

void reportFlashMetrics (String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)

Báo cáo dữ liệu về thời gian nhấp nháy của thiết bị cho hệ thống phụ trợ số liệu

void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)
void setSkipPostFlashFlavorCheck (boolean skipPostFlashFlavorCheck)

nhà thầu công cộng

Thiết BịĐèn FlashChuẩn Bị

public DeviceFlashPreparer ()

Phương thức công khai

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ị như mong đợi so với thông tin bản dựng.

Thông số
device ITestDevice : ITestDevice để flash.

deviceBuild IDeviceBuildInfo : IDeviceBuildInfo được sử 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 ()

Nhận thời gian chờ khởi động thiết bị

trả lại
long

getHostOptions

protected IHostOptions getHostOptions ()

Nhận phiên bản IHostOptions để sử dụng.

Tiếp xúc với thử nghiệm đơn vị

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 về thời gian nhấp nháy của thiết bị cho hệ thống phụ trợ số liệu

Thông số
branch String : nhánh nơi bắt nguồn 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ố sê-ri của thiết bị

queueTime long : thời gian chờ giới hạn nhấp nháy khả dụng

flashingTime long : thời gian dành cho zip hình ảnh thiết bị nhấp nháy

flashingStatus CommandStatus : trạng thái thực thi của lệnh nhấp nháy

setSkipPostFlashBuildIdCheck

protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)

Thông số
skipPostFlashBuildIdCheck boolean

setSkipPostFlashFlavorCheck

protected void setSkipPostFlashFlavorCheck (boolean skipPostFlashFlavorCheck)

Thông số
skipPostFlashFlavorCheck boolean