Merge changes from topic "bt_socket_offload_hal" into main am: d34cb3bbe6

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3370079

Change-Id: I2b9dd539b2fa37870d94340736c1e2df5a268547
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/bluetooth/socket/aidl/vts/VtsHalBluetoothSocketTargetTest.cpp b/bluetooth/socket/aidl/vts/VtsHalBluetoothSocketTargetTest.cpp
index 5973d77..1069207 100644
--- a/bluetooth/socket/aidl/vts/VtsHalBluetoothSocketTargetTest.cpp
+++ b/bluetooth/socket/aidl/vts/VtsHalBluetoothSocketTargetTest.cpp
@@ -112,6 +112,14 @@
     ASSERT_TRUE(socket_capabilities.leCocCapabilities.mtu >= 23 &&
                 socket_capabilities.leCocCapabilities.mtu <= 65535);
   }
+  ASSERT_TRUE(socket_capabilities.rfcommCapabilities.numberOfSupportedSockets >=
+              0);
+  if (socket_capabilities.rfcommCapabilities.numberOfSupportedSockets) {
+    // When RFCOMM is supported, the maximum frame size must be configured
+    // within the valid range defined in the RFCOMM specification.
+    ASSERT_TRUE(socket_capabilities.rfcommCapabilities.maxFrameSize >= 23 &&
+                socket_capabilities.rfcommCapabilities.maxFrameSize <= 32767);
+  }
 }
 
 TEST_P(BluetoothSocketTest, Opened) {