Don't run structural dex file verification in ClassLoaderContext.

ClassLoaderContext should only ensure that checksums match, structural
dex file verification should happen when the runtime or the compiler
runs a dex file.

Test: boots and no regression
Bug: 150032912

(cherry-picked from commit bf7705509ea10d1f172bd37200ebbb6472a139a3)

Merged-In: I23afc92bb01a4ce662c143638b2f2550e6ee6531
Change-Id: I23afc92bb01a4ce662c143638b2f2550e6ee6531
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc
index d2a1b7f..98db62e 100644
--- a/runtime/class_loader_context.cc
+++ b/runtime/class_loader_context.cc
@@ -455,10 +455,12 @@
       std::string error_msg;
       // When opening the dex files from the context we expect their checksum to match their
       // contents. So pass true to verify_checksum.
+      // We don't need to do structural dex file verification, we only need to
+      // check the checksum, so pass false to verify.
       if (fd < 0) {
         if (!dex_file_loader.Open(location.c_str(),
                                   location.c_str(),
-                                  Runtime::Current()->IsVerificationEnabled(),
+                                  /*verify=*/ false,
                                   /*verify_checksum=*/ true,
                                   &error_msg,
                                   &info->opened_dex_files)) {
@@ -484,7 +486,7 @@
         }
       } else if (!dex_file_loader.Open(fd,
                                        location.c_str(),
-                                       Runtime::Current()->IsVerificationEnabled(),
+                                       /*verify=*/ false,
                                        /*verify_checksum=*/ true,
                                        &error_msg,
                                        &info->opened_dex_files)) {