Merge "Only use libbinder_ndk for aidl service." into tm-dev am: f607802265 am: 421e7d99d9

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18092491

Change-Id: I3874c09e4652c0222a342855199ac343837a91ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Edwin Wong
2022-05-05 19:21:03 +00:00
committed by Automerger Merge Worker
13 changed files with 31 additions and 26 deletions

View File

@@ -9,7 +9,7 @@ HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
HIDL_EXTENSION :=
LIB_BINDER := libbinder
LIB_BINDER := libbinder_ndk
endif
LOCAL_LICENSE_CONDITIONS := by_exception_only

View File

@@ -12,7 +12,7 @@ HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
HIDL_EXTENSION :=
LIB_BINDER := libbinder
LIB_BINDER := libbinder_ndk
endif
LOCAL_MODULE := $(test_name)

View File

@@ -12,7 +12,7 @@ HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
HIDL_EXTENSION :=
LIB_BINDER := libbinder
LIB_BINDER := libbinder_ndk
endif
LOCAL_MODULE := $(test_name)

View File

@@ -26,7 +26,7 @@
#ifdef IS_HIDL
# include <hwbinder/IPCThreadState.h>
#else // AIDL is the default
# include <binder/IPCThreadState.h>
# include <android/binder_ibinder.h>
#endif
#include <stdarg.h>
#include <stdio.h>
@@ -82,10 +82,10 @@ uint32_t GetLoggingUid() { return tl_logging_uid_; }
uint32_t GetIpcCallingUid() {
#ifdef IS_HIDL
const auto self = android::hardware::IPCThreadState::selfOrNull();
#else // AIDL is the default
const auto self = android::IPCThreadState::selfOrNull();
#endif
return self ? self->getCallingUid() : UNKNOWN_UID;
#else // AIDL is the default
return AIBinder_getCallingUid();
#endif
}
void InitLogging() {}