OSDN Git Service

Remove unused code
authorHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 22:31:12 +0000 (15:31 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 22:34:32 +0000 (15:34 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I85be9ef424d55f31902765e6e47350865b0d2e12

bta/include/bta_jv_api.h
bta/jv/bta_jv_act.cc
bta/jv/bta_jv_api.cc
bta/jv/bta_jv_int.h

index 080d95f..358e260 100644 (file)
@@ -520,19 +520,6 @@ tBTA_JV_STATUS BTA_JvL2capClose(uint32_t handle);
 
 /*******************************************************************************
  *
- * Function         BTA_JvL2capCloseLE
- *
- * Description      This function closes an L2CAP client connection for Fixed
- *                  Channels Function is idempotent and no callbacks are called!
- *
- * Returns          BTA_JV_SUCCESS, if the request is being processed.
- *                  BTA_JV_FAILURE, otherwise.
- *
- ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capCloseLE(uint32_t handle);
-
-/*******************************************************************************
- *
  * Function         BTA_JvL2capStartServer
  *
  * Description      This function starts an L2CAP server and listens for an
@@ -626,20 +613,6 @@ tBTA_JV_STATUS BTA_JvL2capWrite(uint32_t handle, uint32_t req_id, BT_HDR* msg,
 
 /*******************************************************************************
  *
- * Function         BTA_JvL2capWriteFixed
- *
- * Description      This function writes data to an L2CAP connection
- *                  When the operation is complete, tBTA_JV_L2CAP_CBACK is
- *                  called with BTA_JV_L2CAP_WRITE_FIXED_EVT. Works for
- *                  fixed-channel connections
- *
- ******************************************************************************/
-void BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
-                           uint32_t req_id, tBTA_JV_L2CAP_CBACK* p_cback,
-                           BT_HDR* msg, uint32_t user_id);
-
-/*******************************************************************************
- *
  * Function         BTA_JvRfcommConnect
  *
  * Description      This function makes an RFCOMM conection to a remote BD
index 42e43c5..23cc096 100644 (file)
@@ -1178,24 +1178,6 @@ void bta_jv_l2cap_write(uint32_t handle, uint32_t req_id, BT_HDR* msg,
   p_cb->p_cback(BTA_JV_L2CAP_WRITE_EVT, &bta_jv, user_id);
 }
 
-/* Write data to an L2CAP connection using Fixed channels */
-void bta_jv_l2cap_write_fixed(uint16_t channel, const RawAddress& addr,
-                              uint32_t req_id, BT_HDR* msg, uint32_t user_id,
-                              tBTA_JV_L2CAP_CBACK* p_cback) {
-  tBTA_JV_L2CAP_WRITE_FIXED evt_data;
-  evt_data.status = BTA_JV_FAILURE;
-  evt_data.channel = channel;
-  evt_data.addr = addr;
-  evt_data.req_id = req_id;
-  evt_data.len = 0;
-
-  L2CA_SendFixedChnlData(channel, addr, msg);
-
-  tBTA_JV bta_jv;
-  bta_jv.l2c_write_fixed = evt_data;
-  p_cback(BTA_JV_L2CAP_WRITE_FIXED_EVT, &bta_jv, user_id);
-}
-
 /*******************************************************************************
  *
  * Function     bta_jv_port_data_co_cback
@@ -2130,9 +2112,3 @@ void bta_jv_l2cap_stop_server_le(uint16_t local_chan) {
     }
   }
 }
-
-/* close a fixed channel connection. calls no callbacks. idempotent */
-extern void bta_jv_l2cap_close_fixed(uint32_t handle) {
-  struct fc_client* t = fcclient_find_by_id(handle);
-  if (t) fcclient_free(t);
-}
index eaedd10..b78e4c5 100644 (file)
@@ -260,24 +260,6 @@ tBTA_JV_STATUS BTA_JvL2capClose(uint32_t handle) {
 
 /*******************************************************************************
  *
- * Function         BTA_JvL2capCloseLE
- *
- * Description      This function closes an L2CAP client connection for Fixed
- *                  Channels Function is idempotent and no callbacks are called!
- *
- * Returns          BTA_JV_SUCCESS, if the request is being processed.
- *                  BTA_JV_FAILURE, otherwise.
- *
- ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capCloseLE(uint32_t handle) {
-  VLOG(2) << __func__;
-
-  do_in_main_thread(FROM_HERE, Bind(&bta_jv_l2cap_close_fixed, handle));
-  return BTA_JV_SUCCESS;
-}
-
-/*******************************************************************************
- *
  * Function         BTA_JvL2capStartServer
  *
  * Description      This function starts an L2CAP server and listens for an
@@ -436,26 +418,6 @@ tBTA_JV_STATUS BTA_JvL2capWrite(uint32_t handle, uint32_t req_id, BT_HDR* msg,
 
 /*******************************************************************************
  *
- * Function         BTA_JvL2capWriteFixed
- *
- * Description      This function writes data to an L2CAP connection
- *                  When the operation is complete, tBTA_JV_L2CAP_CBACK is
- *                  called with BTA_JV_L2CAP_WRITE_EVT. Works for
- *                  fixed-channel connections. This function takes ownership of
- *                  p_data, and will osi_free it.
- *
- ******************************************************************************/
-void BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
-                           uint32_t req_id, tBTA_JV_L2CAP_CBACK* p_cback,
-                           BT_HDR* msg, uint32_t user_id) {
-  VLOG(2) << __func__;
-
-  do_in_main_thread(FROM_HERE, Bind(&bta_jv_l2cap_write_fixed, channel, addr,
-                                    req_id, msg, user_id, p_cback));
-}
-
-/*******************************************************************************
- *
  * Function         BTA_JvRfcommConnect
  *
  * Description      This function makes an RFCOMM conection to a remote BD
index 5b40936..83b65e6 100644 (file)
@@ -185,10 +185,5 @@ extern void bta_jv_set_pm_profile(uint32_t handle, tBTA_JV_PM_ID app_id,
                                   tBTA_JV_CONN_STATE init_st);
 
 extern void bta_jv_l2cap_stop_server_le(uint16_t local_chan);
-extern void bta_jv_l2cap_write_fixed(uint16_t channel, const RawAddress& addr,
-                                     uint32_t req_id, BT_HDR* msg,
-                                     uint32_t user_id,
-                                     tBTA_JV_L2CAP_CBACK* p_cback);
-extern void bta_jv_l2cap_close_fixed(uint32_t handle);
 
 #endif /* BTA_JV_INT_H */