Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7988f68 authored by Charlie Boutier's avatar Charlie Boutier Committed by Automerger Merge Worker
Browse files

Merge "[Pandora] throw l2cap exception out" am: dc86e603 am: 4856effe am:...

Merge "[Pandora] throw l2cap exception out" am: dc86e603 am: 4856effe am: 35438fde am: 39deffda

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2516262



Change-Id: If7c5fc9db63eb91169ac01da349addaf7b9b9887
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 57911751 39deffda
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -117,11 +117,21 @@ class L2CAPProxy(ProfileProxy):
        tests_require_secure_connection = [
            "L2CAP/LE/CFC/BV-13-C",
        ]
        tests_connection_target_to_failed = [
            "L2CAP/LE/CFC/BV-05-C",
        ]

        if test in tests_to_open_bluetooth_server_socket:
            secure_connection = test in tests_require_secure_connection
            self.l2cap.ListenL2CAPChannel(connection=self.connection, secure=secure_connection)
            try:
                self.l2cap.AcceptL2CAPChannel(connection=self.connection)
            except Exception as e:
                if test in tests_connection_target_to_failed:
                    self.test_status_map[test] = 'OK'
                    print(test, 'connection targets to fail', file=sys.stderr)
                else:
                    raise e
        return "OK"

    @assert_description
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ class L2cap(val context: Context) : L2CAPImplBase(), Closeable {
        connectionOutStreamMap[connection] = bluetoothSocket.getOutputStream()!!
      } catch (e: IOException) {
        Log.e(TAG, "bluetoothServerSocket not accepted", e)
        return@grpcUnary AcceptL2CAPChannelResponse.newBuilder().build()
        throw e
      }

      AcceptL2CAPChannelResponse.newBuilder().build()