DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer

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


物理的なAndroidハードウェアで画像をフラッシュするITargetPreparer

概要

ネストされたクラス

enum DeviceFlashPreparer.EncryptionOptions

ユーザーデータ画像の暗号化を処理するためのオプションの列挙型

パブリックコンストラクター

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オプションを設定します

取り壊す

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
DeviceNotAvailableException
BuildError

createFlasher

protected abstract IDeviceFlasher createFlasher (ITestDevice device)

使用するIDeviceFlasherを作成します。サブクラスはオーバーライドできます

パラメーター
device ITestDevice

戻り値
IDeviceFlasher

スロー
DeviceNotAvailableException

getDeviceBootWaitTime

protected long getDeviceBootWaitTime ()

デバイスの起動待機時間を取得します

戻り値
long

getHostOptions

protected IHostOptions getHostOptions ()

使用するIHostOptionsインスタンスを取得します。

ユニットテスト用に公開

戻り値
IHostOptions

reportFlashMetrics

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