Merge "libbinder: allow libbinder_ndk + libbinder.vendor" into main am: 0baba59b10 am: 1715d7859c
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3214519
Change-Id: Ia337fe6974bb20e60a9f30c10fae01b251f3e46b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 8b80aed..333f956 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -253,8 +253,11 @@
}
}
+#endif //__ANDROID_VNDK__
+
void* openDeclaredPassthroughHal(const String16& interface, const String16& instance, int flag) {
-#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__) && !defined(__ANDROID_NATIVE_BRIDGE__)
+#if defined(__ANDROID__) && !defined(__ANDROID_VENDOR__) && !defined(__ANDROID_RECOVERY__) && \
+ !defined(__ANDROID_NATIVE_BRIDGE__)
sp<IServiceManager> sm = defaultServiceManager();
String16 name = interface + String16("/") + instance;
if (!sm->isDeclared(name)) {
@@ -274,8 +277,6 @@
#endif
}
-#endif //__ANDROID_VNDK__
-
// ----------------------------------------------------------------------
ServiceManagerShim::ServiceManagerShim(const sp<AidlServiceManager>& impl) {