Don't verify dex file when the runtime is in NoVerify mode.
bug: 30972906
bug: 63920015
Test: systrace of priv-app with OOB, no verification at startup
Change-Id: I479a7ddcfa495228a379744b23c26fa8c91c3dde
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc
index 5510743..38f59ef 100644
--- a/runtime/class_loader_context.cc
+++ b/runtime/class_loader_context.cc
@@ -230,7 +230,7 @@
// contents. So pass true to verify_checksum.
if (!DexFileLoader::Open(location.c_str(),
location.c_str(),
- /*verify*/ true,
+ Runtime::Current()->IsVerificationEnabled(),
/*verify_checksum*/ true,
&error_msg,
&info.opened_dex_files)) {