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 ()

パブリック メソッド

setUp

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