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

Commit 93333103 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [46/63] Remove BTM_RemoveSco

Use get_btm_client_interface() instead

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

Change-Id: Ifb84a6c646a11f4dc0baf94af4405b5f30f6de36
parent 9f55248d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) {
static bool bta_ag_remove_sco(tBTA_AG_SCB* p_scb, bool only_active) {
  if (p_scb->sco_idx != BTM_INVALID_SCO_INDEX) {
    if (!only_active || p_scb->sco_idx == bta_ag_cb.sco.cur_idx) {
      tBTM_STATUS status = BTM_RemoveSco(p_scb->sco_idx);
      tBTM_STATUS status = get_btm_client_interface().sco.BTM_RemoveSco(p_scb->sco_idx);
      log::debug("Removed SCO index:0x{:04x} status:{}", p_scb->sco_idx, btm_status_text(status));
      if (status == BTM_CMD_STARTED) {
        /* SCO is connected; set current control block */
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ static bool bta_hf_client_sco_remove(tBTA_HF_CLIENT_CB* client_cb) {
  log::verbose("");

  if (client_cb->sco_idx != BTM_INVALID_SCO_INDEX) {
    status = BTM_RemoveSco(client_cb->sco_idx);
    status = get_btm_client_interface().sco.BTM_RemoveSco(client_cb->sco_idx);

    log::verbose("idx 0x{:04x}, status:0x{:x}", client_cb->sco_idx, status);

+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ static void socket_read_ready_cb(socket_t* /* socket */, void* context) {
  // routine that the socket is no longer desired and should be torn
  // down.
  if (sco_socket->connect_completed || sco_socket == listen_sco_socket) {
    if (BTM_RemoveSco(sco_socket->sco_handle) == BTM_SUCCESS) {
    if (get_btm_client_interface().sco.BTM_RemoveSco(sco_socket->sco_handle) == BTM_SUCCESS) {
      list_remove(sco_sockets, sco_socket);
    }
    if (sco_socket == listen_sco_socket) {
+0 −4
Original line number Diff line number Diff line
@@ -44,10 +44,6 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* /* remote_bda */, bool /* is_orig */
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
}
tBTM_STATUS BTM_RemoveSco(uint16_t /* sco_inx */) {
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
}
tBTM_STATUS BTM_SetEScoMode(enh_esco_params_t* /* p_parms */) {
  inc_func_call_count(__func__);
  return BTM_SUCCESS;