diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2022-01-24 17:24:34 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-01-24 17:24:34 +0000 |
commit | dec85236eb9f5d112c98d845694f57b665fe2982 (patch) | |
tree | 28ca2b73ff2e1fbcfa0ea2da8526c27846185f83 | |
parent | 8319c195371bb5a366e58e07a665f50a0f17b53a (diff) | |
parent | ef71e506e0a502ea5d4938285b61ee22b76b52bd (diff) | |
download | libnativehelper-dec85236eb9f5d112c98d845694f57b665fe2982.tar.gz |
Merge "Unconditionally use libartd if the debug apex is installed." am: 32e84b4267 am: ef71e506e0
Original change: https://android-review.googlesource.com/c/platform/libnativehelper/+/1959019
Change-Id: I23add88af7d90af8294fdf2c24b96d4a938962cd
-rw-r--r-- | JniInvocation.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/JniInvocation.c b/JniInvocation.c index c6a2a69..7effddb 100644 --- a/JniInvocation.c +++ b/JniInvocation.c @@ -130,18 +130,20 @@ const char* JniInvocationGetLibraryWith(const char* library, return library; } - // Choose the system_preferred_library (if provided). - if (system_preferred_library != NULL && system_preferred_library[0] != '\0') { - return system_preferred_library; - } - - // Try to use the debug library. + // If the debug library is installed, use it. + // TODO(b/216099383): Do this in the test harness instead. struct stat st; if (stat(kDebugJniInvocationLibraryPath, &st) == 0) { return kDebugJniInvocationLibrary; } else if (errno != ENOENT) { ALOGW("Failed to stat %s: %s", kDebugJniInvocationLibraryPath, strerror(errno)); } + + // Choose the system_preferred_library (if provided). + if (system_preferred_library != NULL) { + return system_preferred_library; + } + } return kDefaultJniInvocationLibrary; } |