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

Commit dc86e603 authored by Charlie Boutier's avatar Charlie Boutier Committed by Gerrit Code Review
Browse files

Merge "[Pandora] throw l2cap exception out"

parents 7e351248 cf683657
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()