From 81b3f56cab037577dfa1c53024145a4385df5ca1 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 13 Sep 2022 23:10:12 +0100 Subject: Clarify that is_shared in practice gives access to system libs for system apps. Test: n/a - comment change only Bug: 237577392 Change-Id: I12a2d731fd3b8bff908e8bd363b105d0eb8ad7f8 --- libnativeloader/library_namespaces.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libnativeloader/library_namespaces.cpp') diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp index d49420f313..aaf724153f 100644 --- a/libnativeloader/library_namespaces.cpp +++ b/libnativeloader/library_namespaces.cpp @@ -245,10 +245,11 @@ Result LibraryNamespaces::Create(JNIEnv* env, uint32_t t if (!is_shared) { if (apk_origin == APK_ORIGIN_SYSTEM) { - // System apps commonly get shared namespaces and hence don't need this. - // In practice it's necessary for shared system libraries (i.e. JARs - // rather than actual APKs) that are loaded by ordinary apps which don't - // get shared namespaces. + // System apps commonly get access to system libs from the system + // namespace through shared namespaces (i.e. is_shared is true) and hence + // don't need this. In practice it's necessary for shared system libraries + // (i.e. JARs rather than actual APKs) that are loaded by ordinary apps + // which don't get shared namespaces. apk_origin_msg = "system apk"; // Give access to all libraries in the system and system_ext partitions -- cgit v1.2.3-59-g8ed1b