Merge "Only use libbinder_ndk for aidl service." into tm-dev

This commit is contained in:
Edwin Wong
2022-05-05 17:53:05 +00:00
committed by Android (Google) Code Review
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() {}