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

Commit 7a3702be authored by Chris Manton's avatar Chris Manton
Browse files

mock: [15/63] Remove BTM_EScoConnRsp

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: If48ed4ab207e6a8faf6d6e4eb5f67e2a29b0b4ee
parent b21e5423
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -382,8 +382,8 @@ static void bta_ag_esco_connreq_cback(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA* p
      log::warn("reject incoming SCO connection, remote_bda={}, active_bda={}, current_bda={}",
      log::warn("reject incoming SCO connection, remote_bda={}, active_bda={}, current_bda={}",
                remote_bda ? *remote_bda : RawAddress::kEmpty, active_device_addr,
                remote_bda ? *remote_bda : RawAddress::kEmpty, active_device_addr,
                p_scb ? p_scb->peer_addr : RawAddress::kEmpty);
                p_scb ? p_scb->peer_addr : RawAddress::kEmpty);
      BTM_EScoConnRsp(p_data->conn_evt.sco_inx, HCI_ERR_HOST_REJECT_RESOURCES,
      get_btm_client_interface().sco.BTM_EScoConnRsp(
                      (enh_esco_params_t*)nullptr);
              p_data->conn_evt.sco_inx, HCI_ERR_HOST_REJECT_RESOURCES, (enh_esco_params_t*)nullptr);
    }
    }
  }
  }
}
}
@@ -1534,7 +1534,7 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB* p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA* p_data
    params = esco_parameters_for_codec(SCO_CODEC_CVSD_D1, offload);
    params = esco_parameters_for_codec(SCO_CODEC_CVSD_D1, offload);
  }
  }


  BTM_EScoConnRsp(p_scb->sco_idx, HCI_SUCCESS, &params);
  get_btm_client_interface().sco.BTM_EScoConnRsp(p_scb->sco_idx, HCI_SUCCESS, &params);
  log::verbose("listening for SCO connection");
  log::verbose("listening for SCO connection");
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -134,7 +134,7 @@ static void bta_hf_client_sco_conn_rsp(tBTA_HF_CLIENT_CB* client_cb,
    hci_status = HCI_ERR_HOST_REJECT_DEVICE;
    hci_status = HCI_ERR_HOST_REJECT_DEVICE;
  }
  }


  BTM_EScoConnRsp(p_data->sco_inx, hci_status, &resp);
  get_btm_client_interface().sco.BTM_EScoConnRsp(p_data->sco_inx, hci_status, &resp);
}
}


/*******************************************************************************
/*******************************************************************************
+3 −2
Original line number Original line Diff line number Diff line
@@ -274,7 +274,7 @@ static void connection_request_cb(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA* data)
                                                        connection_request_cb) != BTM_SUCCESS) {
                                                        connection_request_cb) != BTM_SUCCESS) {
    log::warn("Unable to register for ESCO events handle:{}", listen_sco_socket->sco_handle);
    log::warn("Unable to register for ESCO events handle:{}", listen_sco_socket->sco_handle);
  }
  }
  BTM_EScoConnRsp(conn_data->sco_inx, HCI_SUCCESS, NULL);
  get_btm_client_interface().sco.BTM_EScoConnRsp(conn_data->sco_inx, HCI_SUCCESS, NULL);


  return;
  return;


@@ -282,7 +282,8 @@ error:;
  if (client_fd != INVALID_FD) {
  if (client_fd != INVALID_FD) {
    close(client_fd);
    close(client_fd);
  }
  }
  BTM_EScoConnRsp(conn_data->sco_inx, HCI_ERR_HOST_REJECT_RESOURCES, NULL);
  get_btm_client_interface().sco.BTM_EScoConnRsp(conn_data->sco_inx, HCI_ERR_HOST_REJECT_RESOURCES,
                                                 NULL);
}
}


static void connect_completed_cb(uint16_t sco_handle) {
static void connect_completed_cb(uint16_t sco_handle) {