Remove the disable_cdex P/H flag.
Compact dex is now always rejected.
Test: banchan com.android.art && m
adb install out/dist/com.android.art.apex
adb reboot
adb shell pm bg-dexopt-job
adb shell "find data/app data/dalvik-cache -name \*.vdex \
| sort | xargs ls -l" > before
adb shell pm bg-dexopt-job
adb shell "find data/app data/dalvik-cache -name \*.vdex \
| sort | xargs ls -l" > after
diff before after -> check that vdex files haven't changed
Bug: 256664509
Change-Id: If65c06b110100665320c42ef55572d33201b77a0
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index c58e47a..41f7709 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -313,8 +313,8 @@
bool profile_changed,
bool downgrade) {
OatFileInfo& info = GetBestInfo();
- if (info.CheckDisableCompactDexExperiment()) { // TODO(b/256664509): Clean this up.
- VLOG(oat) << "Should recompile: disable cdex experiment";
+ if (info.CheckDisableCompactDex()) { // TODO(b/256664509): Clean this up.
+ VLOG(oat) << "Should recompile: disable cdex";
return kDex2OatFromScratch;
}
DexOptNeeded dexopt_needed = info.GetDexOptNeeded(
@@ -335,7 +335,7 @@
DexOptTrigger dexopt_trigger,
/*out*/ DexOptStatus* dexopt_status) {
OatFileInfo& info = GetBestInfo();
- if (info.CheckDisableCompactDexExperiment()) { // TODO(b/256664509): Clean this up.
+ if (info.CheckDisableCompactDex()) { // TODO(b/256664509): Clean this up.
dexopt_status->location_ = kLocationNoneOrError;
return true;
}
@@ -1271,14 +1271,10 @@
return std::unique_ptr<OatFile>();
}
-// Check if we should reject vdex containing cdex code as part of the
-// disable_cdex experiment.
+// Check if we should reject vdex containing cdex code as part of the cdex
+// deprecation.
// TODO(b/256664509): Clean this up.
-bool OatFileAssistant::OatFileInfo::CheckDisableCompactDexExperiment() {
- std::string ph_disable_compact_dex = android::base::GetProperty(kPhDisableCompactDex, "false");
- if (ph_disable_compact_dex != "true") {
- return false;
- }
+bool OatFileAssistant::OatFileInfo::CheckDisableCompactDex() {
const OatFile* oat_file = GetFile();
if (oat_file == nullptr) {
return false;