Remove libpdx*, libbufferhub* from VNDK

This is largely inspired by ag/3865679: dependencies from libui and
libgui to libpdx_default_transport and libbufferhubque are cut when
building libui and libgui for vendors. This is primarily to exclude
libpdx* and libbufferhubqueue from VNDK.

Bug: 79151096
Test: Build system and inspect bufferhub/pdx related libraries are no
longer in vendor partition.

Change-Id: Idcd524db2a9f6ec96262bcf590fc0f80a0bd26e7
Merged-In: Id4768162aeb72b71d63d7e4498980f276ef58e6b
diff --git a/libs/gui/Android.bp b/libs/gui/Android.bp
index 2768ad8..73f2147 100644
--- a/libs/gui/Android.bp
+++ b/libs/gui/Android.bp
@@ -142,10 +142,26 @@
         "android.hardware.configstore-utils",
     ],
 
+    // bufferhub is not used when building libgui for vendors
+    target: {
+        vendor: {
+            cflags: ["-DNO_BUFFERHUB"],
+            exclude_srcs: [
+                "BufferHubConsumer.cpp",
+                "BufferHubProducer.cpp",
+            ],
+            exclude_shared_libs: [
+                "libbufferhubqueue",
+                "libpdx_default_transport",
+            ],
+        },
+    },
+
     header_libs: [
         "libdvr_headers",
         "libnativebase_headers",
         "libgui_headers",
+        "libpdx_headers",
     ],
 
     export_shared_lib_headers: [