summaryrefslogtreecommitdiff
path: root/libdexfile/dex/dex_file_loader.h
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2024-02-16 20:33:42 +0000
committer Martin Stjernholm <mast@google.com> 2024-02-26 12:06:25 +0000
commit949c197585d383755d9f04c024507959b35e722d (patch)
tree4b451dc9f92a71545133c603730c5c685aadb134 /libdexfile/dex/dex_file_loader.h
parent6d918753132c67fe967f79c7ce20fb3cf57c4587 (diff)
Clarify the format and assumptions on the dex file locations.
libnativeloader now uses them more often to determine how to load libraries based on the java caller location, and then it relies on them being absolute paths. Test: n/a - comment change only Bug: 237577392 Change-Id: I6700c0182e3c942a76880307c5947bfca4c1d0d9
Diffstat (limited to 'libdexfile/dex/dex_file_loader.h')
-rw-r--r--libdexfile/dex/dex_file_loader.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdexfile/dex/dex_file_loader.h b/libdexfile/dex/dex_file_loader.h
index 6530303542..ec7f8ba977 100644
--- a/libdexfile/dex/dex_file_loader.h
+++ b/libdexfile/dex/dex_file_loader.h
@@ -327,6 +327,17 @@ class DexFileLoader {
const File* file_ = &kInvalidFile;
std::optional<File> owned_file_; // May be used as backing storage for 'file_'.
std::shared_ptr<DexFileContainer> root_container_;
+
+ // The full absolute path to the dex file, if it was loaded from disk.
+ //
+ // Can also be a path to a multidex container (typically apk), followed by
+ // kMultiDexSeparator and the file inside the container.
+ //
+ // On host this may not be an absolute path.
+ //
+ // On device libnativeloader uses this to determine the location of the java
+ // package or shared library, which decides where to load native libraries
+ // from.
const std::string location_;
};