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

Commit bef61ef6 authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge changes I4f6fc40d,Ifb1081e8,I5c77108f into main

* changes:
  system/btif: Remove unused parameters
  system/bta: Remove no-op method bta_ar_avdt_conn
  system/btif: Remove unused method MediaCallbacks::SendActiveDeviceChanged
parents f671cbff 80ff0317
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ static uint8_t bta_ag_parse_chld(tBTA_AG_SCB* /* p_scb */, char* p_s) {
 * Returns          Returns bitmap of supported codecs.
 *
 ******************************************************************************/
static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB* /*p_scb*/, char* p_s, char* p_end) {
static tBTA_AG_PEER_CODEC bta_ag_parse_bac(char* p_s, char* p_end) {
  tBTA_AG_PEER_CODEC retval = BTM_SCO_CODEC_NONE;
  tBTA_AG_UUID_CODEC uuid_codec;
  char* p;
@@ -1246,7 +1246,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type, cha
      /* store available codecs from the peer */
      if ((p_scb->peer_features & BTA_AG_PEER_FEAT_CODEC) &&
          (p_scb->features & BTA_AG_FEAT_CODEC)) {
        p_scb->peer_codecs = bta_ag_parse_bac(p_scb, p_arg, p_end);
        p_scb->peer_codecs = bta_ag_parse_bac(p_arg, p_end);
        p_scb->codec_updated = true;

        bool wbs_supported = hfp_hal_interface::get_wbs_supported();
@@ -1953,7 +1953,7 @@ void bta_ag_send_ring(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* /*p_data*/) {
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb) {
  tBTA_AG_UUID_CODEC codec_uuid;
  if (p_scb->codec_fallback) {
    if (p_scb->peer_codecs & BTM_SCO_CODEC_MSBC) {
@@ -1978,7 +1978,7 @@ void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* /*p_data*/) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_send_qac(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* /*p_data*/) {
void bta_ag_send_qac(tBTA_AG_SCB* p_scb) {
  if (!get_swb_codec_status(bluetooth::headset::BTHF_SWB_CODEC_VENDOR_APTX, &p_scb->peer_addr)) {
    log::verbose("send +QAC codecs unsupported");
    bta_ag_send_result(p_scb, BTA_AG_LOCAL_RES_QAC, SWB_CODECS_UNSUPPORTED, 0);
+2 −2
Original line number Diff line number Diff line
@@ -458,8 +458,8 @@ void bta_ag_set_sco_offload_enabled(bool value);
void bta_ag_set_sco_allowed(bool value);
const RawAddress& bta_ag_get_active_device();
void bta_clear_active_device();
void bta_ag_send_qac(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data);
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data);
void bta_ag_send_qac(tBTA_AG_SCB* p_scb);
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb);
/**
 * Check if SCO is managed by Audio is enabled. This is set via the system property
 * bluetooth.sco.managed_by_audio.
+1 −1
Original line number Diff line number Diff line
@@ -716,7 +716,7 @@ void bta_ag_codec_negotiate(tBTA_AG_SCB* p_scb) {
      log::verbose("Sending +QCS, sco_codec={}, is_aptx_swb_codec={}", p_scb->sco_codec,
                   p_scb->is_aptx_swb_codec);
      /* Send +QCS to the peer */
      bta_ag_send_qcs(p_scb, NULL);
      bta_ag_send_qcs(p_scb);
    } else {
      if (aptx_voice) {
        p_scb->sco_codec = BTM_SCO_CODEC_MSBC;
+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ void bta_ag_swb_handle_vs_at_events(tBTA_AG_SCB* p_scb, uint16_t cmd, int16_t in
    case BTA_AG_AT_QAC_EVT:
      if (!get_swb_codec_status(bluetooth::headset::BTHF_SWB_CODEC_VENDOR_APTX,
                                &p_scb->peer_addr)) {
        bta_ag_send_qac(p_scb, NULL);
        bta_ag_send_qac(p_scb);
        break;
      }
      log::verbose("BTA_AG_AT_QAC_EVT");
@@ -95,7 +95,7 @@ void bta_ag_swb_handle_vs_at_events(tBTA_AG_SCB* p_scb, uint16_t cmd, int16_t in
      } else if (p_scb->peer_codecs & BTM_SCO_CODEC_MSBC) {
        p_scb->sco_codec = BTM_SCO_CODEC_MSBC;
      }
      bta_ag_send_qac(p_scb, NULL);
      bta_ag_send_qac(p_scb);
      log::verbose("Received AT+QAC, updating sco codec to SWB: {}", p_scb->sco_codec);
      val->num = p_scb->peer_codecs;
      break;
+0 −15
Original line number Diff line number Diff line
@@ -148,21 +148,6 @@ void bta_ar_dereg_avdt() {
  }
}

/*******************************************************************************
 *
 * Function         bta_ar_avdt_conn
 *
 * Description      This function is called to let ar know that some AVDTP
 *                  profile is connected for this sys_id.
 *                  If the other sys modules started a timer for PENDING_EVT,
 *                  the timer can be stopped now.
 *
 * Returns          void
 *
 ******************************************************************************/
void bta_ar_avdt_conn(tBTA_SYS_ID /*sys_id*/, const RawAddress& /*bd_addr*/,
                      uint8_t /*scb_index*/) {}

/*******************************************************************************
 *
 * Function         bta_ar_reg_avct
Loading