From 2180934dfa6f001d42939427670f3ba5e6d1e77d Mon Sep 17 00:00:00 2001 From: Martin Brabham <optedoblivion@google.com> Date: Wed, 6 Apr 2022 14:11:31 +0000 Subject: [PATCH] Floss: ClearFilterAcceptList BTM Shim API Bug: 223835863 Test: mma -j $(nproc) Test: ./build.py Tag: #floss Change-Id: Iee557df2378d5941d6bfe1576ee7b3b5ce51b24a --- system/main/shim/btm_api.cc | 5 +++++ system/main/shim/btm_api.h | 11 +++++++++++ system/test/mock/mock_main_shim_btm_api.cc | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/system/main/shim/btm_api.cc b/system/main/shim/btm_api.cc index 275f382ef32..9c1389e7299 100644 --- a/system/main/shim/btm_api.cc +++ b/system/main/shim/btm_api.cc @@ -1339,3 +1339,8 @@ tBTM_STATUS bluetooth::shim::BTM_ClearEventMask() { controller_get_interface()->clear_event_mask(); return BTM_SUCCESS; } + +tBTM_STATUS bluetooth::shim::BTM_ClearFilterAcceptList() { + Stack::GetInstance()->GetAcl()->ClearAcceptList(); + return BTM_SUCCESS; +} diff --git a/system/main/shim/btm_api.h b/system/main/shim/btm_api.h index e8b90cfa041..9c0bfbebb32 100644 --- a/system/main/shim/btm_api.h +++ b/system/main/shim/btm_api.h @@ -1832,6 +1832,17 @@ tBTM_STATUS BTM_ClearEventFilter(void); ******************************************************************************/ tBTM_STATUS BTM_ClearEventMask(void); +/******************************************************************************* + * + * Function BTM_ClearFilterAcceptList + * + * Description Clears the connect list in the controller + * + * Returns Return btm status + * + ******************************************************************************/ +tBTM_STATUS BTM_ClearFilterAcceptList(void); + /** * Send remote name request to GD shim Name module */ diff --git a/system/test/mock/mock_main_shim_btm_api.cc b/system/test/mock/mock_main_shim_btm_api.cc index adef4fc3132..d943f81d1b3 100644 --- a/system/test/mock/mock_main_shim_btm_api.cc +++ b/system/test/mock/mock_main_shim_btm_api.cc @@ -434,3 +434,8 @@ tBTM_STATUS bluetooth::shim::BTM_ClearEventMask() { mock_function_count_map[__func__]++; return BTM_SUCCESS; } + +tBTM_STATUS bluetooth::shim::BTM_ClearFilterAcceptList() { + mock_function_count_map[__func__]++; + return BTM_SUCCESS; +} -- GitLab