From: Hansong Zhang Date: Thu, 27 Aug 2020 22:31:12 +0000 (-0700) Subject: Remove unused code X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a43711c3b711f18e9db5ea25c74f093eb37b0503;p=android-x86%2Fsystem-bt.git Remove unused code Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: I85be9ef424d55f31902765e6e47350865b0d2e12 --- diff --git a/bta/include/bta_jv_api.h b/bta/include/bta_jv_api.h index 080d95fe8..358e260f1 100644 --- a/bta/include/bta_jv_api.h +++ b/bta/include/bta_jv_api.h @@ -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 diff --git a/bta/jv/bta_jv_act.cc b/bta/jv/bta_jv_act.cc index 42e43c5d5..23cc09638 100644 --- a/bta/jv/bta_jv_act.cc +++ b/bta/jv/bta_jv_act.cc @@ -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); -} diff --git a/bta/jv/bta_jv_api.cc b/bta/jv/bta_jv_api.cc index eaedd10a9..b78e4c56f 100644 --- a/bta/jv/bta_jv_api.cc +++ b/bta/jv/bta_jv_api.cc @@ -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 diff --git a/bta/jv/bta_jv_int.h b/bta/jv/bta_jv_int.h index 5b4093621..83b65e63a 100644 --- a/bta/jv/bta_jv_int.h +++ b/bta/jv/bta_jv_int.h @@ -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 */