Import contexthub v4 from bluetooth socket hal

Bug: 342012881
Bug: 367419086
Test: m android.hardware.contexthub-update-api
Test: m android.hardware.bluetooth.socket-update-api
Change-Id: I439f2aa7580a6e7f630eb10562dc8b7a85154577
diff --git a/bluetooth/socket/aidl/Android.bp b/bluetooth/socket/aidl/Android.bp
index 44e7f5a..77679f8 100644
--- a/bluetooth/socket/aidl/Android.bp
+++ b/bluetooth/socket/aidl/Android.bp
@@ -26,8 +26,14 @@
     vendor_available: true,
     host_supported: true,
     srcs: ["android/hardware/bluetooth/socket/*.aidl"],
+    imports: [
+        "android.hardware.contexthub-V4",
+    ],
     stability: "vintf",
     backend: {
+        java: {
+            enabled: false,
+        },
         ndk: {
             apex_available: [
                 "//apex_available:platform",
diff --git a/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl b/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
index e5b31c2..6844d31 100644
--- a/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
+++ b/bluetooth/socket/aidl/aidl_api/android.hardware.bluetooth.socket/current/android/hardware/bluetooth/socket/SocketContext.aidl
@@ -38,6 +38,5 @@
   String name;
   int aclConnectionHandle;
   android.hardware.bluetooth.socket.ChannelInfo channelInfo;
-  long hubId;
-  long endpointId;
+  android.hardware.contexthub.EndpointId endpointId;
 }
diff --git a/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl b/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
index 5e9be31..1f9be07 100644
--- a/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
+++ b/bluetooth/socket/aidl/android/hardware/bluetooth/socket/SocketContext.aidl
@@ -17,6 +17,7 @@
 package android.hardware.bluetooth.socket;
 
 import android.hardware.bluetooth.socket.ChannelInfo;
+import android.hardware.contexthub.EndpointId;
 
 /**
  * Socket context.
@@ -48,12 +49,7 @@
     ChannelInfo channelInfo;
 
     /**
-     * The ID of the Hub to which the end point belongs for hardware offload data path.
+     * Unique identifier for an endpoint at the hardware offload data path.
      */
-    long hubId;
-
-    /**
-     * The ID of the Hub endpoint for hardware offload data path.
-     */
-    long endpointId;
+    EndpointId endpointId;
 }
diff --git a/bluetooth/socket/aidl/default/Android.bp b/bluetooth/socket/aidl/default/Android.bp
index 10e673c..a730057 100644
--- a/bluetooth/socket/aidl/default/Android.bp
+++ b/bluetooth/socket/aidl/default/Android.bp
@@ -32,6 +32,7 @@
     ],
     static_libs: [
         "android.hardware.bluetooth.socket-V1-ndk",
+        "android.hardware.contexthub-V4-ndk",
         "liblog",
     ],
     fuzz_config: {
diff --git a/bluetooth/socket/aidl/vts/Android.bp b/bluetooth/socket/aidl/vts/Android.bp
index fa9e3b1..174dd4b 100644
--- a/bluetooth/socket/aidl/vts/Android.bp
+++ b/bluetooth/socket/aidl/vts/Android.bp
@@ -18,6 +18,7 @@
     ],
     static_libs: [
         "android.hardware.bluetooth.socket-V1-ndk",
+        "android.hardware.contexthub-V4-ndk",
         "libbluetooth-types",
     ],
     test_suites: [