diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-31 07:01:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-31 07:01:41 +0000 |
commit | 147743176a4790111473f3ae97543addac33d2f6 (patch) | |
tree | 8123b2a44edbc4c5c73ebe178eacc7e69d2906f9 | |
parent | f751b1340193f3343681f624950926740237169b (diff) | |
parent | 7a1d8a10a8e40004034953a91ad314d1176e146f (diff) | |
download | core-147743176a4790111473f3ae97543addac33d2f6.tar.gz |
Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev
-rw-r--r-- | libvndksupport/linker.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libvndksupport/linker.c b/libvndksupport/linker.c index 12aa3bec8..289f153e7 100644 --- a/libvndksupport/linker.c +++ b/libvndksupport/linker.c @@ -30,21 +30,17 @@ void* android_load_sphal_library(const char* name, int flag) { .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = sphal_namespace, }; void* handle = android_dlopen_ext(name, flag, &dlextinfo); - if (handle) { - return handle; - } else { - ALOGW( - "Could not load %s from sphal namespace: %s. " - "Falling back to loading it from the current namespace,", - name, dlerror()); + if (!handle) { + ALOGE("Could not load %s from sphal namespace: %s.", name, dlerror()); } + return handle; } else { ALOGI( "sphal namespace is not configured for this process. " "Loading %s from the current namespace instead.", name); + return dlopen(name, flag); } - return dlopen(name, flag); } int android_unload_sphal_library(void* handle) { return dlclose(handle); } |