summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/pm/PackageDexOptimizer.java8
-rw-r--r--services/core/java/com/android/server/pm/dex/ArtManagerService.java7
-rw-r--r--tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java2
3 files changed, 8 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 98073429faab..892fa12ddf52 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -450,11 +450,9 @@ public class PackageDexOptimizer {
for (String isa : dexCodeInstructionSets) {
try {
- String[] status = DexFile.getDexFileOptimizationStatus(path, isa);
- String compilationStatus = status[0];
- String compilationReason = status[1];
- pw.println(isa + ": [status=" + compilationStatus
- +"] reason=[" + compilationReason + "]");
+ DexFile.OptimizationInfo info = DexFile.getDexFileOptimizationInfo(path, isa);
+ pw.println(isa + ": [status=" + info.getStatus()
+ +"] [reason=" + info.getReason() + "]");
} catch (IOException ioe) {
pw.println(isa + ": [Exception]: " + ioe.getMessage());
}
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
index cdafe5715ffc..9c2ad4635d58 100644
--- a/services/core/java/com/android/server/pm/dex/ArtManagerService.java
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -527,9 +527,10 @@ public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
String compilationFilter;
try {
String isa = VMRuntime.getInstructionSet(abi);
- String[] stats = DexFile.getDexFileOptimizationStatus(info.getBaseCodePath(), isa);
- compilationFilter = stats[0];
- compilationReason = stats[1];
+ DexFile.OptimizationInfo optInfo =
+ DexFile.getDexFileOptimizationInfo(info.getBaseCodePath(), isa);
+ compilationFilter = optInfo.getStatus();
+ compilationReason = optInfo.getReason();
} catch (FileNotFoundException e) {
Slog.e(TAG, "Could not get optimizations status for " + info.getBaseCodePath(), e);
compilationFilter = "error";
diff --git a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
index 3734412981d8..e247951f16ef 100644
--- a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
+++ b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
@@ -173,7 +173,7 @@ public final class BackgroundDexOptServiceIntegrationTests {
private static String getCompilerFilter(String pkg) throws IOException {
String cmd = String.format("dumpsys package %s", pkg);
String[] lines = runShellCommandSplitLines(cmd);
- final String substr = "compilation_filter=";
+ final String substr = "[status=";
for (String line : lines) {
int startIndex = line.indexOf(substr);
if (startIndex < 0) {