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

Commit 6378fc02 authored by Jeremy Wu's avatar Jeremy Wu
Browse files

HFP: fix peer_codecs bitmask in RFCOMM and SDP workaround

The bitop doesn't seem right after reading the associated comments,
while there may be almost no effect at the moment, we change it from AND
to OR so that `peer_codecs` reflects full capability as intended.

Bug: 243732454
Test: Compilation test
Change-Id: Ib386aa5be3a4cf1cc18f04cf5095440b1106745c
parent ae347b2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ void bta_ag_rfc_open(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
      bool sdp_wbs_support = p_scb->peer_sdp_features & BTA_AG_FEAT_WBS_SUPPORT;
      if (!p_scb->received_at_bac && sdp_wbs_support) {
        p_scb->codec_updated = true;
        p_scb->peer_codecs = BTM_SCO_CODEC_CVSD & BTM_SCO_CODEC_MSBC;
        p_scb->peer_codecs = BTM_SCO_CODEC_CVSD | BTM_SCO_CODEC_MSBC;
        p_scb->sco_codec = UUID_CODEC_MSBC;
      }
    } else {
+1 −1
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ bool bta_ag_sdp_find_attr(tBTA_AG_SCB* p_scb, tBTA_SERVICE_MASK service) {
          // 2. But do not send required AT+BAC command
          // Will assume mSBC is enabled and try codec negotiation by default
          p_scb->codec_updated = true;
          p_scb->peer_codecs = BTM_SCO_CODEC_CVSD & BTM_SCO_CODEC_MSBC;
          p_scb->peer_codecs = BTM_SCO_CODEC_CVSD | BTM_SCO_CODEC_MSBC;
          p_scb->sco_codec = UUID_CODEC_MSBC;
        }
        if (sdp_features != p_scb->peer_sdp_features) {