to top
public abstract class

DeviceFlashPreparer

extends Object
implements ITargetCleaner
java.lang.Object
   ↳ com.android.tradefed.targetprep.DeviceFlashPreparer

Class Overview

A ITargetPreparer that flashes an image on physical Android hardware.

Summary

Nested Classes
enum DeviceFlashPreparer.EncryptionOptions Enum of options for handling the encryption of userdata image  
Public Constructors
DeviceFlashPreparer()
Public Methods
void setUp(ITestDevice device, IBuildInfo buildInfo)
Perform the target setup for testing.
void setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)
Set the userdata-flash option
void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
Perform the target cleanup/teardown after testing.
Protected Methods
abstract IDeviceFlasher createFlasher(ITestDevice device)
Create IDeviceFlasher to use.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.targetprep.ITargetCleaner
From interface com.android.tradefed.targetprep.ITargetPreparer

Public Constructors

public DeviceFlashPreparer ()

Public Methods

public void setUp (ITestDevice device, IBuildInfo buildInfo)

Perform the target setup for testing.

Parameters
device the ITestDevice to prepare.
buildInfo data about the build under test.

public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

Set the userdata-flash option

public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)

Perform the target cleanup/teardown after testing.

Parameters
device the ITestDevice to prepare.
buildInfo data about the build under test.
e if the invocation ended with an exception, this will be the exception that was caught at the Invocation level. Otherwise, will be null.

Protected Methods

protected abstract IDeviceFlasher createFlasher (ITestDevice device)

Create IDeviceFlasher to use. Subclasses can override