Support the -i flag in the new dexdump.
Rationale:
The old dexdump supported the -i feature (ignore checksum failures).
This CL adds the same functionality to the new dexdump. Note that
this feature is, for example, useful to inspect DEX files that are
extracted from images (with quickened instructions), since the
checksum is not always valid in those cases.
BUG=29548017
Change-Id: I6017b2f3d789f450560b568297f43c62bf9453b1
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 62c723e..61dc287 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -1167,12 +1167,15 @@
std::unique_ptr<const DexFile> OatFile::OatDexFile::OpenDexFile(std::string* error_msg) const {
ScopedTrace trace(__PRETTY_FUNCTION__);
+ static constexpr bool kVerify = false;
+ static constexpr bool kVerifyChecksum = false;
return DexFile::Open(dex_file_pointer_,
FileSize(),
dex_file_location_,
dex_file_location_checksum_,
this,
- false /* verify */,
+ kVerify,
+ kVerifyChecksum,
error_msg);
}