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

Commit f394258a authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "Revert "HFP: Only active BT device can hung up call"" into main

parents c0feedfa 0ee965b8
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -899,22 +899,11 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type,
    case BTA_AG_AT_A_EVT:
    case BTA_AG_SPK_EVT:
    case BTA_AG_MIC_EVT:
    case BTA_AG_AT_CHUP_EVT:
    case BTA_AG_AT_CBC_EVT:
      /* send OK */
      bta_ag_send_ok(p_scb);
      break;

    case BTA_AG_AT_CHUP_EVT:
      if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) {
        LOG(WARNING) << __func__ << ": AT+CHUP rejected as " << p_scb->peer_addr
                << " is not the active device";
        event = BTA_AG_ENABLE_EVT;
        bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_ALLOWED);
      } else {
        bta_ag_send_ok(p_scb);
      }
      break;

    case BTA_AG_AT_BLDN_EVT:
      /* Do not send OK, App will send error or OK depending on
      ** last dial number enabled or not */