DexMetadataExtractor
public
class
DexMetadataExtractor
extends BaseTargetPreparer
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.DexMetadataExtractor | |
Installs Dex Metadata files for specified APKs.
Summary
Fields | |
|---|---|
protected
List<File> |
mDoInstallMultipleApks
|
Public constructors | |
|---|---|
DexMetadataExtractor()
Constructor for DexMetadataExtractor. |
|
DexMetadataExtractor(IRunUtil runUtil)
|
|
Public methods | |
|---|---|
ITestDevice
|
getDevice()
Returns the device that the preparer should apply to. |
void
|
setAaptVersion(AaptParser.AaptVersion aaptVersion)
Sets the version of AAPT for APK parsing. |
void
|
setUp(TestInformation testInfo)
Extracts Dex Metadata files from the provided APKs using profgen and installs them alongside the APKs. |
void
|
setUserId(int userId)
If the apk should be installed for a particular user, sets the id of the user to install for. |
void
|
tearDown(TestInformation testInfo, Throwable e)
|
Protected methods | |
|---|---|
File
|
getLocalPathForFilename(TestInformation testInfo, String apkFileName)
|
String
|
parsePackageName(File testAppFile)
Get the package name from the test app. |
File
|
resolveApkFile(TestInformation testInfo, File apkFile)
Helper to resolve an apk to its File. |
Fields
mDoInstallMultipleApks
protected List<File> mDoInstallMultipleApks
Public constructors
DexMetadataExtractor
public DexMetadataExtractor ()
Constructor for DexMetadataExtractor.
Public methods
getDevice
public ITestDevice getDevice ()
Returns the device that the preparer should apply to.
| Returns | |
|---|---|
ITestDevice |
|
| Throws | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
setAaptVersion
public void setAaptVersion (AaptParser.AaptVersion aaptVersion)
Sets the version of AAPT for APK parsing.
| Parameters | |
|---|---|
aaptVersion |
AaptParser.AaptVersion |
setUp
public void setUp (TestInformation testInfo)
Extracts Dex Metadata files from the provided APKs using profgen and installs them alongside the APKs.
| Parameters | |
|---|---|
testInfo |
TestInformation |
| Throws | |
|---|---|
|
BuildError, DeviceNotAvailableException |
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
setUserId
public void setUserId (int userId)
If the apk should be installed for a particular user, sets the id of the user to install for.
| Parameters | |
|---|---|
userId |
int |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| Parameters | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| Throws | |
|---|---|
DeviceNotAvailableException |
|
Protected methods
getLocalPathForFilename
protected File getLocalPathForFilename (TestInformation testInfo, String apkFileName)
| Parameters | |
|---|---|
testInfo |
TestInformation |
apkFileName |
String |
| Returns | |
|---|---|
File |
|
| Throws | |
|---|---|
TargetSetupError |
|
parsePackageName
protected String parsePackageName (File testAppFile)
Get the package name from the test app.
| Parameters | |
|---|---|
testAppFile |
File |
| Returns | |
|---|---|
String |
|
| Throws | |
|---|---|
TargetSetupError |
|
resolveApkFile
protected File resolveApkFile (TestInformation testInfo, File apkFile)
Helper to resolve an apk to its File.
| Parameters | |
|---|---|
testInfo |
TestInformation |
apkFile |
File |
| Returns | |
|---|---|
File |
|
| Throws | |
|---|---|
DeviceNotAvailableException |
|
TargetSetupError |
|