Hide some headers from libbinder to vendors

The headers that are related to system services are now hidden to
vendors. Note that this does not break anything because vendors have
already been disallowed to talk to system services via sepolicy. Their
use of binder is strictly limited within themselves (via
/dev/vndbinder).

The hidden headers are now guarded with __ANDROID_VNDK__ and including
them from vendors (or vendor variants of other VNDK libraries) will
trigger a build-time error.

Bug: 78113963
Test: m -j
Test: devices boots to the UI
Change-Id: I19be5ca024fc4081b7861d908d75758c1d956a83
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index 6103188..7c1eaaf 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -75,6 +75,28 @@
         ":libbinder_aidl",
     ],
 
+    target: {
+        vendor: {
+            exclude_srcs: [
+                "ActivityManager.cpp",
+                "AppOpsManager.cpp",
+                "IActivityManager.cpp",
+                "IAppOpsCallback.cpp",
+                "IAppOpsService.cpp",
+                "IBatteryStats.cpp",
+                "IMediaResourceMonitor.cpp",
+                "IPermissionController.cpp",
+                "IProcessInfoService.cpp",
+                "IUidObserver.cpp",
+                "PermissionCache.cpp",
+                "PermissionController.cpp",
+                "ProcessInfoService.cpp",
+                "IpPrefix.cpp",
+                ":libbinder_aidl",
+            ],
+        },
+    },
+
     aidl: {
         export_aidl_headers: true,
     },