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: Id9147d4aeee9ba2b301b6893dea5884dce9c14fa
This commit is contained in:
Kiyoung Kim 2019-03-21 16:56:05 +09:00
parent 92bfff3d95
commit ddbb6ed7e7
1 changed files with 3 additions and 2 deletions

View File

@ -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;