odrefresh: enable loading of system_server image files

Fix check in ValidateBootImageChecksum() to account for image files
with multiple components which exists for boot-framework when
compiling on device.

Update logic for only_load_system_executable to be
only_load_trusted_executable and treat /system and the ART APEX data
directory as trusted.

Add test to check .art,.odex,.vdex files derived from the
system_server classpath are mapped when the ART module updates.

Add test to check .art,.oat,.vdex files for the boot class path
extensions are present in the zygote processes.

Bug: 180949581
Test: atest com.android.tests.odsign.OnDeviceSigningHostTest#verifyGeneratedArtifactsLoaded
Change-Id: I3114fc6393402d8da2eb16ba756ab5fab713dc20
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index 50b54af..9cfa781 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -107,13 +107,14 @@
   // load_executable should be true if the caller intends to try and load
   // executable code for this dex location.
   //
-  // only_load_system_executable should be true if the caller intends to have
-  // only oat files from /system loaded executable.
+  // only_load_trusted_executable should be true if the caller intends to have
+  // only oat files from trusted locations loaded executable. See IsTrustedLocation() for
+  // details on trusted locations.
   OatFileAssistant(const char* dex_location,
                    const InstructionSet isa,
                    ClassLoaderContext* context,
                    bool load_executable,
-                   bool only_load_system_executable = false);
+                   bool only_load_trusted_executable = false);
 
   // Similar to this(const char*, const InstructionSet, bool), however, if a valid zip_fd is
   // provided, vdex, oat, and zip files will be read from vdex_fd, oat_fd and zip_fd respectively.
@@ -122,7 +123,7 @@
                    const InstructionSet isa,
                    ClassLoaderContext* context,
                    bool load_executable,
-                   bool only_load_system_executable,
+                   bool only_load_trusted_executable,
                    int vdex_fd,
                    int oat_fd,
                    int zip_fd);
@@ -425,8 +426,8 @@
   // Whether we will attempt to load oat files executable.
   bool load_executable_ = false;
 
-  // Whether only oat files on /system are loaded executable.
-  const bool only_load_system_executable_ = false;
+  // Whether only oat files from trusted locations are loaded executable.
+  const bool only_load_trusted_executable_ = false;
   // Whether the potential zip file only contains uncompressed dex.
   // Will be set during GetRequiredDexChecksums.
   bool zip_file_only_contains_uncompressed_dex_ = true;