DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer implements IConfigurationReceiver

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


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

요약

공개 생성자

DeviceFlashPreparer ()

공개 메소드

IBuildInfo getBuild ( TestInformation testInfo)

특정 시나리오에 대해 재정의할 수 있도록 getBuildInfo를 래핑합니다.

boolean isIncrementalFlashingEnabled ()
boolean isIncrementalFlashingForceDisabled ()
void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
void setConfiguration ( IConfiguration configuration)

사용 중인 IConfiguration 삽입합니다.

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 setUseIncrementalFlashing (boolean incrementalFlashing)

공개 생성자

DeviceFlashPreparer

public DeviceFlashPreparer ()

공개 메소드

getBuild

public IBuildInfo getBuild (TestInformation testInfo)

특정 시나리오에 대해 재정의할 수 있도록 getBuildInfo를 래핑합니다.

매개변수
testInfo TestInformation

보고
IBuildInfo

isIncrementalFlashingEnabled

public boolean isIncrementalFlashingEnabled ()

보고
boolean

isIncrementalFlashingForceDisabled

public boolean isIncrementalFlashingForceDisabled ()

보고
boolean

setAllowCrossRelease깜박임

public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)

매개변수
allowCrossReleaseFlashing boolean

setConfiguration

public void setConfiguration (IConfiguration configuration)

사용 중인 IConfiguration 삽입합니다.

매개변수
configuration IConfiguration

설정

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

보호된 방법

checkDevice제품 유형

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

setUseIncrementalFlashing

protected void setUseIncrementalFlashing (boolean incrementalFlashing)

매개변수
incrementalFlashing boolean