summaryrefslogtreecommitdiff
path: root/runtime/oat_file_assistant.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2020-12-11 18:26:14 -0800
committer Calin Juravle <calin@google.com> 2020-12-14 19:00:35 +0000
commit5ff2393e1fb6e61fc74f20c66f80f4b8656987d1 (patch)
treee94b8cfc92379678b4f2e6446aa6d28a6408222f /runtime/oat_file_assistant.cc
parent99459f3bdd8d569ec7054920cbc32e6915d1e125 (diff)
Remove stripped-apk related logic from CLC
Stripped-apks are no longer supported by the runtime and the current logic prevents bug fixes and code evolution. Bug: 111442216 Test: test-art-host Change-Id: I30d5825e4f6453981ca9165bebafe67557c28b93
Diffstat (limited to 'runtime/oat_file_assistant.cc')
-rw-r--r--runtime/oat_file_assistant.cc23
1 files changed, 4 insertions, 19 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 8e8dc89390..d7cf513cf8 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -572,25 +572,10 @@ const std::vector<uint32_t>* OatFileAssistant::GetRequiredDexChecksums() {
required_dex_checksums_found_ = true;
has_original_dex_files_ = true;
} else {
- // This can happen if the original dex file has been stripped from the
- // apk.
- VLOG(oat) << "OatFileAssistant: " << error_msg;
+ // The only valid case here is for APKs without dex files.
+ required_dex_checksums_found_ = false;
has_original_dex_files_ = false;
-
- // Get the checksums from the odex if we can.
- const OatFile* odex_file = odex_.GetFile();
- if (odex_file != nullptr) {
- required_dex_checksums_found_ = true;
- for (size_t i = 0; i < odex_file->GetOatHeader().GetDexFileCount(); i++) {
- std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str());
- const OatDexFile* odex_dex_file = odex_file->GetOatDexFile(dex.c_str(), nullptr);
- if (odex_dex_file == nullptr) {
- required_dex_checksums_found_ = false;
- break;
- }
- cached_required_dex_checksums_.push_back(odex_dex_file->GetDexFileLocationChecksum());
- }
- }
+ VLOG(oat) << "Could not get required checksum: " << error_msg;
}
}
return required_dex_checksums_found_ ? &cached_required_dex_checksums_ : nullptr;
@@ -890,7 +875,7 @@ bool OatFileAssistant::OatFileInfo::ClassLoaderContextIsOkay(ClassLoaderContext*
? oat_file_assistant_->dex_location_.substr(0, dir_index)
: "";
- if (!context->OpenDexFiles(oat_file_assistant_->isa_, classpath_dir, context_fds)) {
+ if (!context->OpenDexFiles(classpath_dir, context_fds)) {
VLOG(oat) << "ClassLoaderContext check failed: dex files from the context could not be opened";
return false;
}