summaryrefslogtreecommitdiff
path: root/libnativeloader/library_namespaces.cpp
diff options
context:
space:
mode:
authorKiyoung Kim <kiyoungkim@google.com>2020-01-29 16:09:38 +0900
committerKiyoung Kim <kiyoungkim@google.com>2020-02-07 03:25:40 +0000
commit99c19ca707391f0908313c7cee2ef315d2b5cb3c (patch)
treec5213c3eb212732c88cc455e8ca67c1990d29767 /libnativeloader/library_namespaces.cpp
parentcf0c6ef642517fba3bc9a211acaed742ff39b86d (diff)
Update platform namespace name
Platform namespace has been renamed as 'system' from linkerconfig generator. To meet this requirement, libnativeloader should search for namespace 'system' rather than namespace 'platform'. Bug: 147987608 Test: m -j passed Test: atest libnativeloader_test passed Change-Id: I23d865ac71a80619f291eb9ae0761a2cad5df352
Diffstat (limited to 'libnativeloader/library_namespaces.cpp')
-rw-r--r--libnativeloader/library_namespaces.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp
index 3be379a8da..a9b22468ee 100644
--- a/libnativeloader/library_namespaces.cpp
+++ b/libnativeloader/library_namespaces.cpp
@@ -52,7 +52,7 @@ constexpr const char* kCronetNamespaceName = "cronet";
// classloader, the classloader-namespace namespace associated with that
// classloader is selected for dlopen. The namespace is configured so that its
// search path is set to the app-local JNI directory and it is linked to the
-// platform namespace with the names of libs listed in the public.libraries.txt.
+// system namespace with the names of libs listed in the public.libraries.txt.
// This way an app can only load its own JNI libraries along with the public libs.
constexpr const char* kClassloaderNamespaceName = "classloader-namespace";
// Same thing for vendor APKs.
@@ -61,7 +61,7 @@ constexpr const char* kVendorClassloaderNamespaceName = "vendor-classloader-name
// "classloader-namespace-shared" or "vendor-classloader-namespace-shared",
// respectively. A shared namespace (cf. ANDROID_NAMESPACE_TYPE_SHARED) has
// inherited all the libraries of the parent classloader namespace, or the
-// platform namespace for the main app classloader. It is used to give full
+// system namespace for the main app classloader. It is used to give full
// access to the platform libraries for apps bundled in the system image,
// including their later updates installed in /data.
constexpr const char* kSharedNamespaceSuffix = "-shared";
@@ -241,7 +241,7 @@ Result<NativeLoaderNamespace*> LibraryNamespaces::Create(JNIEnv* env, uint32_t t
// ... and link to other namespaces to allow access to some public libraries
bool is_bridged = app_ns->IsBridged();
- auto platform_ns = NativeLoaderNamespace::GetPlatformNamespace(is_bridged);
+ auto platform_ns = NativeLoaderNamespace::GetSystemNamespace(is_bridged);
if (!platform_ns) {
return platform_ns.error();
}
@@ -293,7 +293,7 @@ Result<NativeLoaderNamespace*> LibraryNamespaces::Create(JNIEnv* env, uint32_t t
if (!vendor_public_libraries().empty()) {
auto vendor_ns = NativeLoaderNamespace::GetExportedNamespace(kVendorNamespaceName, is_bridged);
- // when vendor_ns is not configured, link to the platform namespace
+ // when vendor_ns is not configured, link to the system namespace
auto target_ns = vendor_ns ? vendor_ns : platform_ns;
if (target_ns) {
linked = app_ns->Link(*target_ns, vendor_public_libraries());