DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends BaseTargetPreparer implements IConfigurationReceiver

java.lang.オブジェクト
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

set構成

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

保護されたメソッド

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

フラッシャーの作成

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

レポートフラッシュメトリクス

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

setIncrementalFlashing を使用する

protected void setUseIncrementalFlashing (boolean incrementalFlashing)

パラメーター
incrementalFlashing boolean