Fix and re-enable runtime image loading.
We need to store the dex checksums of the dex files being loaded at
runtime, which can be different from the vdex checksums due to compact
dex.
We also need to store the boot classpath and boot classpath checksums,
in the extremely unlikely case the boot image checksum isn't enough.
Test: 845-data-image
Bug: 260557058
Change-Id: I39ca19451ef7a2376f24e631e1867c683f361e3d
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 0312bad..1b49ce9 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -536,7 +536,10 @@
return kOatBootImageOutOfDate;
}
if (!gc::space::ImageSpace::ValidateApexVersions(
- file, GetOatFileAssistantContext()->GetApexVersions(), &error_msg)) {
+ file.GetOatHeader(),
+ GetOatFileAssistantContext()->GetApexVersions(),
+ file.GetLocation(),
+ &error_msg)) {
VLOG(oat) << error_msg;
return kOatBootImageOutOfDate;
}