From ab4932be3bad052d5a0f7b05cd59b21a88fe26e6 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Sat, 27 Feb 2021 20:20:44 -0800 Subject: [PATCH] Remove unused API BTM_GetPeerSCA Toward meaningful code Bug: 163134718 Test: cert Tag: #refactor Change-Id: I5050817e500d33265ecd8bfc9ec2b547ab0ff625 --- bta/test/common/mock_stack_acl.cc | 4 ---- stack/acl/btm_acl.cc | 22 ---------------------- stack/include/btm_api.h | 13 ------------- 3 files changed, 39 deletions(-) diff --git a/bta/test/common/mock_stack_acl.cc b/bta/test/common/mock_stack_acl.cc index c6822b766..449efed11 100644 --- a/bta/test/common/mock_stack_acl.cc +++ b/bta/test/common/mock_stack_acl.cc @@ -214,10 +214,6 @@ uint16_t btm_get_acl_disc_reason_code(void) { mock_function_count_map[__func__]++; return 0; } -uint8_t BTM_GetPeerSCA(const RawAddress& remote_bda, tBT_TRANSPORT transport) { - mock_function_count_map[__func__]++; - return 0; -} uint8_t BTM_SetTraceLevel(uint8_t new_level) { mock_function_count_map[__func__]++; return 0; diff --git a/stack/acl/btm_acl.cc b/stack/acl/btm_acl.cc index b9b8ff6c9..3ae2d8895 100644 --- a/stack/acl/btm_acl.cc +++ b/stack/acl/btm_acl.cc @@ -1237,28 +1237,6 @@ uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda, /******************************************************************************* * - * Function BTM_GetPeerSCA - * - * Description This function is called to get peer sleep clock accuracy - * - * Returns SCA or 0xFF if SCA was never previously requested, request - * is not supported by peer device or ACL does not exist - * - ******************************************************************************/ -uint8_t BTM_GetPeerSCA(const RawAddress& remote_bda, tBT_TRANSPORT transport) { - tACL_CONN* p; - p = internal_.btm_bda_to_acl(remote_bda, transport); - if (p != (tACL_CONN*)NULL) { - return (p->sca); - } - LOG_WARN("Unable to find active acl"); - - /* If here, no BD Addr found */ - return (0xFF); -} - -/******************************************************************************* - * * Function btm_rejectlist_role_change_device * * Description This function is used to rejectlist the device if the role diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h index bdbf28520..83f130504 100644 --- a/stack/include/btm_api.h +++ b/stack/include/btm_api.h @@ -752,19 +752,6 @@ uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda, /******************************************************************************* * - * Function BTM_GetPeerSCA - * - * Description This function is called to get peer sleep clock accuracy - * - * Returns SCA or 0xFF if SCA was never previously requested, request - * is not supported by peer device or ACL does not exist - * - ******************************************************************************/ -extern uint8_t BTM_GetPeerSCA(const RawAddress& remote_bda, - tBT_TRANSPORT transport); - -/******************************************************************************* - * * Function BTM_DeleteStoredLinkKey * * Description This function is called to delete link key for the specified -- 2.11.0