DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer

java.lang.객체
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.DeviceFlashPreparer


실제 Android 하드웨어에서 이미지를 플래시하는 ITargetPreparer 입니다.

요약

공개 생성자

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)

사용할 IDeviceFlasher 만듭니다.

long getDeviceBootWaitTime ()

장치 부팅 대기 시간을 가져옵니다.

IHostOptions getHostOptions ()

사용할 IHostOptions 인스턴스를 가져옵니다.

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 옵션 설정

tearDown

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
com.android.tradefed.device.DeviceNotAvailableException
BuildError
DeviceNotAvailableException

createFlasher

protected abstract IDeviceFlasher createFlasher (ITestDevice device)

사용할 IDeviceFlasher 만듭니다. 하위 클래스는 재정의할 수 있습니다.

매개변수
device ITestDevice

보고
IDeviceFlasher

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getDeviceBootWaitTime

protected long getDeviceBootWaitTime ()

장치 부팅 대기 시간을 가져옵니다.

보고
long

getHostOptions

protected IHostOptions getHostOptions ()

사용할 IHostOptions 인스턴스를 가져옵니다.

단위 테스트를 위해 노출됨

보고
IHostOptions

보고서FlashMetrics

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