From 23ff8eb9c2a4b00e6a9444af02dc9106349035de Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Thu, 21 Mar 2019 16:56:05 +0900 Subject: [PATCH] Do not fail when there is no vndk namespace Some of the legacy devices may not have vndk namespace. To make this work, libnativeloader should not fail when it fails to search for vndk namespace. Bug: 129011845 Test: m -j Change-Id: I6f68aeb6ae84a00985cc20561b2fcdb461be9724 Merged-In: Id9147d4aeee9ba2b301b6893dea5884dce9c14fa --- libnativeloader/native_loader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp index 1c2581f08..5cc0857f6 100644 --- a/libnativeloader/native_loader.cpp +++ b/libnativeloader/native_loader.cpp @@ -288,8 +288,9 @@ class LibraryNamespaces { // Give access to VNDK-SP libraries from the 'vndk' namespace. vndk_ns = android_get_exported_namespace(kVndkNamespaceName); - LOG_ALWAYS_FATAL_IF(vndk_ns == nullptr, "Cannot find \"%s\" namespace for %s apks", - kVndkNamespaceName, origin_partition); + if (vndk_ns == nullptr) { + ALOGW("Cannot find \"%s\" namespace for %s apks", kVndkNamespaceName, origin_partition); + } // Different name is useful for debugging namespace_name = kVendorClassloaderNamespaceName;