DexMetadataExtractor
public
class
DexMetadataExtractor
extends BaseTargetPreparer
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.DexMetadataExtractor | |
为指定的 APK 安装 Dex 元数据文件。
摘要
字段 | |
|---|---|
protected
List<File> |
mDoInstallMultipleApks
|
公共构造函数 | |
|---|---|
DexMetadataExtractor()
DexMetadataExtractor 的构造函数。 |
|
DexMetadataExtractor(IRunUtil runUtil)
|
|
公共方法 | |
|---|---|
ITestDevice
|
getDevice()
返回准备程序应应用到的设备。 |
void
|
setAaptVersion(AaptParser.AaptVersion aaptVersion)
设置用于 APK 解析的 AAPT 版本。 |
void
|
setUp(TestInformation testInfo)
使用 profgen 从提供的 APK 中提取 Dex 元数据文件,并将其与 APK 一起安装。 |
void
|
setUserId(int userId)
如果应为特定用户安装 APK,则设置要安装的用户 ID。 |
void
|
tearDown(TestInformation testInfo, Throwable e)
|
受保护的方法 | |
|---|---|
File
|
getLocalPathForFilename(TestInformation testInfo, String apkFileName)
|
String
|
parsePackageName(File testAppFile)
从测试应用获取软件包名称。 |
File
|
resolveApkFile(TestInformation testInfo, File apkFile)
用于将 APK 解析为其文件的帮助程序。 |
字段
mDoInstallMultipleApks
protected List<File> mDoInstallMultipleApks
公共构造函数
DexMetadataExtractor
public DexMetadataExtractor ()
DexMetadataExtractor 的构造函数。
公共方法
getDevice
public ITestDevice getDevice ()
返回准备程序应应用到的设备。
| 返回 | |
|---|---|
ITestDevice |
|
| 抛出 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
setAaptVersion
public void setAaptVersion (AaptParser.AaptVersion aaptVersion)
设置用于 APK 解析的 AAPT 版本。
| 参数 | |
|---|---|
aaptVersion |
AaptParser.AaptVersion |
setUp
public void setUp (TestInformation testInfo)
使用 profgen 从提供的 APK 中提取 Dex 元数据文件,并将其 与 APK 一起安装。
| 参数 | |
|---|---|
testInfo |
TestInformation |
| 抛出 | |
|---|---|
|
BuildError, DeviceNotAvailableException |
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
setUserId
public void setUserId (int userId)
如果应为特定用户安装 APK,则设置要安装的用户 ID。
| 参数 | |
|---|---|
userId |
int |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| 参数 | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| 抛出 | |
|---|---|
DeviceNotAvailableException |
|
受保护的方法
getLocalPathForFilename
protected File getLocalPathForFilename (TestInformation testInfo, String apkFileName)
| 参数 | |
|---|---|
testInfo |
TestInformation |
apkFileName |
String |
| 返回 | |
|---|---|
File |
|
| 抛出 | |
|---|---|
TargetSetupError |
|
parsePackageName
protected String parsePackageName (File testAppFile)
从测试应用获取软件包名称。
| 参数 | |
|---|---|
testAppFile |
File |
| 返回 | |
|---|---|
String |
|
| 抛出 | |
|---|---|
TargetSetupError |
|
resolveApkFile
protected File resolveApkFile (TestInformation testInfo, File apkFile)
用于将 APK 解析为其文件的帮助程序。
| 参数 | |
|---|---|
testInfo |
TestInformation |
apkFile |
File |
| 返回 | |
|---|---|
File |
|
| 抛出 | |
|---|---|
DeviceNotAvailableException |
|
TargetSetupError |
|