Locally link and remove unused funcs stack/btm/btm_sco

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I41a65c6c12648868c804b1783558bb4aa1b96aed
diff --git a/system/stack/btm/btm_sco.cc b/system/stack/btm/btm_sco.cc
index bb0226f..8d06cc9 100644
--- a/system/stack/btm/btm_sco.cc
+++ b/system/stack/btm/btm_sco.cc
@@ -91,7 +91,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sco_flush_sco_data(UNUSED_ATTR uint16_t sco_inx) {}
+static void btm_sco_flush_sco_data(UNUSED_ATTR uint16_t sco_inx) {}
 
 /*******************************************************************************
  *
@@ -225,32 +225,6 @@
 
 /*******************************************************************************
  *
- * Function         BTM_WriteScoData
- *
- * Description      This function write SCO data to a specified instance. The
- *                  data to be written p_buf needs to carry an offset of
- *                  HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
- *                  exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is
- *                  set to 60 and is configurable. Data longer than the maximum
- *                  bytes will be truncated.
- *
- * Returns          BTM_SUCCESS: data write is successful
- *                  BTM_ILLEGAL_VALUE: SCO data contains illegal offset value.
- *                  BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO
- *                                      packet size.
- *                  BTM_NO_RESOURCES: no resources.
- *                  BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is
- *                                    not routed via HCI.
- *
- *
- ******************************************************************************/
-tBTM_STATUS BTM_WriteScoData(UNUSED_ATTR uint16_t sco_inx,
-                             UNUSED_ATTR BT_HDR* p_buf) {
-  return (BTM_NO_RESOURCES);
-}
-
-/*******************************************************************************
- *
  * Function         btm_send_connect_request
  *
  * Description      This function is called to respond to SCO connect
@@ -360,71 +334,6 @@
 
 /*******************************************************************************
  *
- * Function         btm_set_sco_ind_cback
- *
- * Description      This function is called to register for TCS SCO connect
- *                  indications.
- *
- * Returns          void
- *
- ******************************************************************************/
-void btm_set_sco_ind_cback(tBTM_SCO_IND_CBACK* sco_ind_cb) {
-  btm_cb.sco_cb.app_sco_ind_cb = sco_ind_cb;
-}
-
-/*******************************************************************************
- *
- * Function         btm_accept_sco_link
- *
- * Description      This function is called to respond to TCS SCO connect
- *                  indications
- *
- * Returns          void
- *
- ******************************************************************************/
-void btm_accept_sco_link(uint16_t sco_inx, enh_esco_params_t* p_setup,
-                         tBTM_SCO_CB* p_conn_cb, tBTM_SCO_CB* p_disc_cb) {
-  tSCO_CONN* p_sco;
-
-  if (BTM_MAX_SCO_LINKS == 0) {
-    btm_reject_sco_link(sco_inx);
-    return;
-  }
-
-  if (sco_inx >= BTM_MAX_SCO_LINKS) {
-    BTM_TRACE_ERROR("btm_accept_sco_link: Invalid sco_inx(%d)", sco_inx);
-    return;
-  }
-
-  /* Link role is ignored in for this message */
-  p_sco = &btm_cb.sco_cb.sco_db[sco_inx];
-  p_sco->p_conn_cb = p_conn_cb;
-  p_sco->p_disc_cb = p_disc_cb;
-  p_sco->esco.data.link_type =
-      BTM_LINK_TYPE_ESCO; /* Accept with all supported types */
-
-  BTM_TRACE_DEBUG("TCS accept SCO: Packet Types 0x%04x", p_setup->packet_types);
-
-  btm_esco_conn_rsp(sco_inx, HCI_SUCCESS, p_sco->esco.data.bd_addr, p_setup);
-}
-
-/*******************************************************************************
- *
- * Function         btm_reject_sco_link
- *
- * Description      This function is called to respond to SCO connect
- *                  indications
- *
- * Returns          void
- *
- ******************************************************************************/
-void btm_reject_sco_link(uint16_t sco_inx) {
-  btm_esco_conn_rsp(sco_inx, HCI_ERR_HOST_REJECT_RESOURCES,
-                    btm_cb.sco_cb.sco_db[sco_inx].esco.data.bd_addr, NULL);
-}
-
-/*******************************************************************************
- *
  * Function         BTM_CreateSco
  *
  * Description      This function is called to create an SCO connection. If the