Only use libbinder_ndk for aidl service.

[ Merged from http://go/wvgerrit/151169 ]

Test: Netflix and Google TV streaming and downloaded playback
Test: unit tests
Test: atest VtsAidlHalDrmTargetTest
Test: adb shell readelf -d /vendor/bin/hw/android.hardware.drm-service.widevine
Test: adb shell readelf -d /vendor/lib64/libwvaidl.so

Bug: 230791937
Change-Id: Ia60d9fc838bf228b40d99b076a837ae789fa2d03
This commit is contained in:
Edwin Wong
2022-04-29 20:31:18 +00:00
parent da1e3c5de2
commit af5f57a46c
13 changed files with 31 additions and 26 deletions

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() {}