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

Commit 9842e326 authored by Chienyuan's avatar Chienyuan Committed by Chienyuan Huang
Browse files

HFP: Open SLC after AT+BIND if HF indicators supported

If HF indicators is supported by HF and AG. Service Level Connection
shall consider established after the HF has successfully retrieved
information about HF indicators currently enabled by the AG using the
AT+BIND? command.

Bug: 169935138
Test: connect headset during a call
Tag: #compatibility
Change-Id: I67cfac3b035904a2375c77d726a8e16accf2b014
parent 99d92c3d
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -961,8 +961,14 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
        /* send OK */
        bta_ag_send_ok(p_scb);

        /* if service level conn. not already open, now it's open */
        /* if service level conn. not already open and our features and
        ** peer features do not have HF Indicators, service level conn. now open
        */
        if (!p_scb->svc_conn &&
            !((p_scb->features & BTA_AG_FEAT_HF_IND) &&
              (p_scb->peer_features & BTA_AG_PEER_FEAT_HF_IND))) {
          bta_ag_svc_conn_open(p_scb, tBTA_AG_DATA::kEmpty);
        }
      } else {
        val.idx = bta_ag_parse_chld(p_scb, val.str);

@@ -1053,11 +1059,13 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
        bta_ag_send_ok(p_scb);

        /* if service level conn. not already open and our features and
        ** peer features do not have 3-way, service level conn. now open
        */
         * peer features do not have 3-way or HF Indicators, service level conn.
         * now open */
        if (!p_scb->svc_conn &&
            !((p_scb->features & BTA_AG_FEAT_3WAY) &&
              (p_scb->peer_features & BTA_AG_PEER_FEAT_3WAY))) {
              (p_scb->peer_features & BTA_AG_PEER_FEAT_3WAY)) &&
            !((p_scb->features & BTA_AG_FEAT_HF_IND) &&
              (p_scb->peer_features & BTA_AG_PEER_FEAT_HF_IND))) {
          bta_ag_svc_conn_open(p_scb, tBTA_AG_DATA::kEmpty);
        }
      } else {