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
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp
index 1c2581f..5cc0857 100644
--- a/libnativeloader/native_loader.cpp
+++ b/libnativeloader/native_loader.cpp
@@ -288,8 +288,9 @@
// 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;