Restore fallback behavior in the no-image stripped-dex case.
Add --strip-dex option to run-test to test this case.
Bug: 27599626
Change-Id: I010543f48c39adbda007e2e05dda62ac1d70715c
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index 94f6345..3846605 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -364,7 +364,7 @@
// However, if the app was part of /system and preopted, there is no original dex file
// available. In that case grudgingly accept the oat file.
- if (!DexFile::MaybeDex(dex_location)) {
+ if (!oat_file_assistant.HasOriginalDexFiles()) {
accept_oat_file = true;
LOG(WARNING) << "Dex location " << dex_location << " does not seem to include dex file. "
<< "Allow oat file use. This is potentially dangerous.";