GoogleDeviceFlashPreparer

public class GoogleDeviceFlashPreparer
extends DeviceFlashPreparer implements IInvocationContextReceiver, ILabPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.DeviceFlashPreparer
       ↳ com.google.android.tradefed.targetprep.GoogleDeviceFlashPreparer


這個特化項目支援刷入 Google 裝置所需的自訂步驟。DeviceFlashPreparer

系統會根據產品類型建立適當的 IDeviceFlasher,藉此處理這項作業

摘要

公用建構函式

GoogleDeviceFlashPreparer()

公用方法

IBuildInfo getBuild(TestInformation testInfo)

包裝 getBuildInfo,以便在特定情境中覆寫。

void setAltStaticDeviceInfoClass(String altStaticDeviceInfoClass)
void setInvocationContext(IInvocationContext invocationContext)

void setUp(TestInformation testInfo)

受保護的方法

void checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)

刷機前可能需要檢查,確保裝置與建構資訊相符。

IDeviceFlasher createFlasher(ITestDevice device)

建立 IDeviceFlasher 以供使用

FlashingResourcesRetrieverCacheWrapper createFlashingResources(String productType)

公用建構函式

GoogleDeviceFlashPreparer

public GoogleDeviceFlashPreparer ()

公用方法

getBuild

public IBuildInfo getBuild (TestInformation testInfo)

包裝 getBuildInfo,以便在特定情境中覆寫該函式。

參數
testInfo TestInformation

傳回
IBuildInfo

setAltStaticDeviceInfoClass

public void setAltStaticDeviceInfoClass (String altStaticDeviceInfoClass)

參數
altStaticDeviceInfoClass String

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

參數
invocationContext IInvocationContext

setUp

public void setUp (TestInformation testInfo)

參數
testInfo TestInformation

擲回
BuildError
DeviceNotAvailableException
TargetSetupError

受保護的方法

checkDeviceProductType

protected void checkDeviceProductType (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

刷機前可能需要檢查,確保裝置與建構資訊相符。

參數
device ITestDevice:要刷新的 ITestDevice

deviceBuild IDeviceBuildInfo:用於刷新的 IDeviceBuildInfo

擲回
BuildError
DeviceNotAvailableException

createFlasher

protected IDeviceFlasher createFlasher (ITestDevice device)

建立 IDeviceFlasher 以供使用

參數
device ITestDevice

傳回
IDeviceFlasher

擲回
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

createFlashingResources

protected FlashingResourcesRetrieverCacheWrapper createFlashingResources (String productType)

參數
productType String

傳回
FlashingResourcesRetrieverCacheWrapper