Use dex2oatd when available on debug builds
Enable use of dex2oatd for background dexopt service for eng and
userdebug builds. This allows us to have more extensive checking
on dogfood devices.
(cherry picked from commit 2118ec4d7e176b0ea96a79ca3b45e1cca9724eed)
Bug: 68025088
Test: runtest -x services/tests/servicetests/src/com/android/server/pm/dex/DexoptOptionsTests.java
Merged-In: I292ac7f355350edc8cf06f417740226ee6bac65d
Change-Id: I292ac7f355350edc8cf06f417740226ee6bac65d
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 017a061..dfa828d 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -53,6 +53,7 @@
import static com.android.server.pm.Installer.DEXOPT_FORCE;
import static com.android.server.pm.Installer.DEXOPT_STORAGE_CE;
import static com.android.server.pm.Installer.DEXOPT_STORAGE_DE;
+import static com.android.server.pm.Installer.DEXOPT_IDLE_BACKGROUND_JOB;
import static com.android.server.pm.InstructionSets.getAppDexInstructionSets;
import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets;
@@ -603,6 +604,9 @@
if ((flags & DEXOPT_STORAGE_DE) == DEXOPT_STORAGE_DE) {
flagsList.add("storage_de");
}
+ if ((flags & DEXOPT_IDLE_BACKGROUND_JOB) == DEXOPT_IDLE_BACKGROUND_JOB) {
+ flagsList.add("idle_background_job");
+ }
return String.join(",", flagsList);
}