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

Commit 5fb524ed authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove unused code in btm and unused import in l2cap"

parents 90c7928e 36f2ed8f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,10 +39,10 @@
#include "btif_uid.h"
#include "btif_util.h"
#include "btm_api.h"
#include "btm_int.h"
#include "common/metrics.h"
#include "l2c_api.h"
#include "l2cdefs.h"
#include "osi/include/osi.h"

struct packet {
  struct packet *next, *prev;
+0 −2
Original line number Diff line number Diff line
@@ -162,8 +162,6 @@ extern bool btm_is_sco_active(uint16_t handle);
extern void btm_remove_sco_links(const RawAddress& bda);
extern bool btm_is_sco_active_by_bdaddr(const RawAddress& remote_bda);

extern void btm_read_def_esco_mode(enh_esco_params_t* p_parms);
extern uint16_t btm_find_scb_by_handle(uint16_t handle);
extern void btm_sco_flush_sco_data(uint16_t sco_inx);

/* Internal functions provided by btm_devctl.cc
+0 −41
Original line number Diff line number Diff line
@@ -847,31 +847,6 @@ void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
#endif
}

/*******************************************************************************
 *
 * Function         btm_find_scb_by_handle
 *
 * Description      Look through all active SCO connection for a match based on
 *                  the HCI handle.
 *
 * Returns          index to matched SCO connection CB, or BTM_MAX_SCO_LINKS if
 *                  no match.
 *
 ******************************************************************************/
uint16_t btm_find_scb_by_handle(uint16_t handle) {
  int xx;
  tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];

  for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) {
    if ((p->state == SCO_ST_CONNECTED) && (p->hci_handle == handle)) {
      return (xx);
    }
  }

  /* If here, no match found */
  return (xx);
}

/*******************************************************************************
 *
 * Function         BTM_RemoveSco
@@ -1245,22 +1220,6 @@ void BTM_EScoConnRsp(uint16_t sco_inx, uint8_t hci_status,
#endif
}

/*******************************************************************************
 *
 * Function         btm_read_def_esco_mode
 *
 * Description      This function copies the current default esco settings into
 *                  the return buffer.
 *
 * Returns          tBTM_SCO_TYPE
 *
 ******************************************************************************/
void btm_read_def_esco_mode(enh_esco_params_t* p_parms) {
#if (BTM_MAX_SCO_LINKS > 0)
  *p_parms = btm_cb.sco_cb.def_esco_parms;
#endif
}

/*******************************************************************************
 *
 * Function         btm_esco_proc_conn_chg
+0 −3
Original line number Diff line number Diff line
@@ -23,15 +23,12 @@
 ******************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "bt_common.h"
#include "bt_types.h"
#include "bt_utils.h"
#include "btm_api.h"
#include "btm_int.h"
#include "btu.h"
#include "device/include/controller.h"
#include "hci/include/btsnoop.h"
#include "hcidefs.h"