Improve library lookup logic

Linker tries to open a library even if it can
be found by soname. This only happens if the
library was previously opened under different
target sdk version.

Bug: http://b/21876587
Bug: http://b/21153477
Bug: http://b/21171302
Bug: https://code.google.com/p/android/issues/detail?id=160921
Change-Id: I7dbbcc3b49933bffd89ca0af55371e1a1f2bf4c2
This commit is contained in:
Dmitriy Ivanov
2015-06-16 15:38:21 -07:00
parent 4d0d31475f
commit 28154f5c56
2 changed files with 45 additions and 8 deletions

View File

@@ -21,6 +21,10 @@
static std::atomic<uint32_t> g_target_sdk_version(__ANDROID_API__);
void set_application_target_sdk_version(uint32_t target) {
// translate current sdk_version to platform sdk_version
if (target == 0) {
target = __ANDROID_API__;
}
g_target_sdk_version = target;
}