From: Hansong Zhang Date: Fri, 22 Jan 2021 08:42:39 +0000 (-0800) Subject: Remove some unused stuff X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=69a832c0e70c2c7d8523667a42ffbcadd3e4a097;p=android-x86%2Fsystem-bt.git Remove some unused stuff Test: cert/run Tag: #gd-refactor Bug: 141555841 Change-Id: I6fcaf472341920f476608974bf3bf1183b9eb212 --- diff --git a/stack/acl/acl.h b/stack/acl/acl.h index 57881932d..649bec841 100644 --- a/stack/acl/acl.h +++ b/stack/acl/acl.h @@ -399,7 +399,6 @@ struct sACL_CB { friend uint16_t BTM_GetNumAclLinks(void); friend uint16_t acl_get_supported_packet_types(); friend uint8_t btm_handle_to_acl_index(uint16_t hci_handle); - friend void BTM_SetDefaultLinkSuperTout(uint16_t timeout); friend void acl_initialize_power_mode(const tACL_CONN& p_acl); friend void acl_set_disconnect_reason(tHCI_STATUS acl_disc_reason); friend void btm_acl_created(const RawAddress& bda, uint16_t hci_handle, diff --git a/stack/acl/btm_acl.cc b/stack/acl/btm_acl.cc index 4d21a84ab..53c77eb6b 100644 --- a/stack/acl/btm_acl.cc +++ b/stack/acl/btm_acl.cc @@ -2787,17 +2787,6 @@ bool acl_create_le_connection(const RawAddress& bd_addr) { return acl_create_le_connection_with_id(CONN_MGR_ID_L2CAP, bd_addr); } -void acl_cancel_le_connection(const RawAddress& bd_addr) { - if (bluetooth::shim::is_gd_acl_enabled()) { - tBLE_BD_ADDR address_with_type{ - .bda = bd_addr, - .type = BLE_ADDR_RANDOM, - }; - return bluetooth::shim::ACL_CancelLeConnection(address_with_type); - } - connection_manager::direct_connect_remove(CONN_MGR_ID_L2CAP, bd_addr); -} - void acl_rcv_acl_data(BT_HDR* p_msg) { acl_header_t acl_header{ .handle = HCI_INVALID_HANDLE, diff --git a/stack/include/acl_api.h b/stack/include/acl_api.h index 7d2982ed7..50bbc7a23 100644 --- a/stack/include/acl_api.h +++ b/stack/include/acl_api.h @@ -248,9 +248,6 @@ void btm_cont_rswitch_from_handle(uint16_t hci_handle); uint8_t acl_link_role_from_handle(uint16_t handle); -uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr, - tBT_TRANSPORT transport); - void acl_set_disconnect_reason(tHCI_STATUS acl_disc_reason); bool acl_is_role_switch_allowed(); diff --git a/stack/include/l2cap_acl_interface.h b/stack/include/l2cap_acl_interface.h index d6d1006c6..79aa103ba 100644 --- a/stack/include/l2cap_acl_interface.h +++ b/stack/include/l2cap_acl_interface.h @@ -28,7 +28,6 @@ void acl_create_classic_connection(const RawAddress& bd_addr, bool is_bonding); bool acl_create_le_connection(const RawAddress& bd_addr); bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr); -void acl_cancel_le_connection(const RawAddress& bd_addr); void acl_reject_connection_request(const RawAddress& bd_addr, uint8_t reason); void acl_send_data_packet_br_edr(const RawAddress& bd_addr, BT_HDR* p_buf); void acl_send_data_packet_ble(const RawAddress& bd_addr, BT_HDR* p_buf); diff --git a/stack/test/common/mock_btm_api_layer.cc b/stack/test/common/mock_btm_api_layer.cc index e2ac67f5e..0b5c76fc8 100644 --- a/stack/test/common/mock_btm_api_layer.cc +++ b/stack/test/common/mock_btm_api_layer.cc @@ -31,8 +31,3 @@ bool BTM_SetSecurityLevel(bool is_originator, const char* p_name, sec_level, psm, mx_proto_id, mx_chan_id); } - -uint8_t acl_link_role(const RawAddress& remote_bd_addr, - tBT_TRANSPORT transport) { - return btm_api_interface->acl_link_role(remote_bd_addr, transport); -} \ No newline at end of file