From: Zach Johnson Date: Wed, 26 Aug 2020 00:25:57 +0000 (-0700) Subject: goodbye BTM_SetOutService X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5504c908294c4a11174038fa06fcf0d533333d25;p=android-x86%2Fsystem-bt.git goodbye BTM_SetOutService you will not be missed Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: I5b76ec20ee7d0e91bf55e4898d5c722481b8bf81 --- diff --git a/main/shim/btm_api.h b/main/shim/btm_api.h index 4d5bf18cb..3ca803662 100644 --- a/main/shim/btm_api.h +++ b/main/shim/btm_api.h @@ -1463,19 +1463,6 @@ bool BTM_SetSecurityLevel(bool is_originator, const char* p_name, /******************************************************************************* * - * Function BTM_SetOutService - * - * Description This function is called to set the service for - * outgoing connection. - * - * Returns void - * - ******************************************************************************/ -void BTM_SetOutService(const RawAddress& bd_addr, uint8_t service_id, - uint32_t mx_chan_id); - -/******************************************************************************* - * * Function BTM_SecClrService * * Description Removes specified service record(s) from the security diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc index 3fa37b027..43632bd25 100644 --- a/stack/btm/btm_sec.cc +++ b/stack/btm/btm_sec.cc @@ -1389,44 +1389,6 @@ bool BTM_PeerSupportsSecureConnections(const RawAddress& bd_addr) { return (p_dev_rec->remote_supports_secure_connections); } -/******************************************************************************* - * - * Function BTM_SetOutService - * - * Description This function is called to set the service for - * outgoing connections. - * - * If the profile/application calls BTM_SetSecurityLevel - * before initiating a connection, this function does not - * need to be called. - * - * Returns void - * - ******************************************************************************/ -void BTM_SetOutService(const RawAddress& bd_addr, uint8_t service_id, - uint32_t mx_chan_id) { - tBTM_SEC_DEV_REC* p_dev_rec; - tBTM_SEC_SERV_REC* p_serv_rec = &btm_cb.sec_serv_rec[0]; - - btm_cb.p_out_serv = p_serv_rec; - p_dev_rec = btm_find_dev(bd_addr); - - for (int i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_serv_rec++) { - if ((p_serv_rec->security_flags & BTM_SEC_IN_USE) && - (p_serv_rec->service_id == service_id) && - (p_serv_rec->orig_mx_chan_id == mx_chan_id)) { - BTM_TRACE_API( - "BTM_SetOutService p_out_serv id %d, psm 0x%04x, proto_id %d, " - "chan_id %d", - p_serv_rec->service_id, p_serv_rec->psm, p_serv_rec->mx_proto_id, - p_serv_rec->orig_mx_chan_id); - btm_cb.p_out_serv = p_serv_rec; - if (p_dev_rec) p_dev_rec->p_cur_service = p_serv_rec; - break; - } - } -} - /************************************************************************ * I N T E R N A L F U N C T I O N S ************************************************************************/ diff --git a/stack/btm/btm_sec.h b/stack/btm/btm_sec.h index bd4a134ed..49d548d39 100644 --- a/stack/btm/btm_sec.h +++ b/stack/btm/btm_sec.h @@ -384,23 +384,6 @@ bool BTM_PeerSupportsSecureConnections(const RawAddress& bd_addr); /******************************************************************************* * - * Function BTM_SetOutService - * - * Description This function is called to set the service for - * outgoing connections. - * - * If the profile/application calls BTM_SetSecurityLevel - * before initiating a connection, this function does not - * need to be called. - * - * Returns void - * - ******************************************************************************/ -void BTM_SetOutService(const RawAddress& bd_addr, uint8_t service_id, - uint32_t mx_chan_id); - -/******************************************************************************* - * * Function btm_sec_l2cap_access_req * * Description This function is called by the L2CAP to grant permission to