diff options
author | 2025-02-15 01:51:06 -0800 | |
---|---|---|
committer | 2025-02-15 01:51:06 -0800 | |
commit | 71684fd077f8704a518f8b6004b376c978d5a472 (patch) | |
tree | b54e8e89819e0f20d5ecdc9a3e42c6e24c9ac194 /system/test | |
parent | 9498e165471ca081a0058d7297a94dec4a4cd016 (diff) | |
parent | f5975181982bd8c566ed5afa1f9ecd22309d82ee (diff) |
Merge changes Ibcd5c586,I1a126812 into main
* changes:
main/shim/acl: simplify LE connection shim
Pass device deletion from acccept list through connection manager
Diffstat (limited to 'system/test')
-rw-r--r-- | system/test/mock/mock_main_shim_acl.cc | 9 | ||||
-rw-r--r-- | system/test/mock/mock_main_shim_acl_api.cc | 3 | ||||
-rw-r--r-- | system/test/mock/mock_main_shim_acl_api.h | 11 |
3 files changed, 5 insertions, 18 deletions
diff --git a/system/test/mock/mock_main_shim_acl.cc b/system/test/mock/mock_main_shim_acl.cc index bd27e6927f..14bc02eb49 100644 --- a/system/test/mock/mock_main_shim_acl.cc +++ b/system/test/mock/mock_main_shim_acl.cc @@ -74,15 +74,6 @@ void shim::Acl::CancelClassicConnection(const hci::Address& /* address */) { inc_func_call_count(__func__); } -void shim::Acl::AcceptLeConnectionFrom(const hci::AddressWithType& /* address_with_type */, - bool /* is_direct */, std::promise<bool> /* promise */) { - inc_func_call_count(__func__); -} - -void shim::Acl::IgnoreLeConnectionFrom(const hci::AddressWithType& /* address_with_type */) { - inc_func_call_count(__func__); -} - void bluetooth::shim::Acl::OnClassicLinkDisconnected(HciHandle /* handle */, hci::ErrorCode /* reason */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_main_shim_acl_api.cc b/system/test/mock/mock_main_shim_acl_api.cc index 59015dbc50..f8d1f18fe2 100644 --- a/system/test/mock/mock_main_shim_acl_api.cc +++ b/system/test/mock/mock_main_shim_acl_api.cc @@ -35,10 +35,9 @@ void bluetooth::shim::ACL_CreateClassicConnection(const RawAddress& /* raw_addre void bluetooth::shim::ACL_CancelClassicConnection(const RawAddress& /* raw_address */) { inc_func_call_count(__func__); } -bool bluetooth::shim::ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& /* legacy_address_with_type */, +void bluetooth::shim::ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& /* legacy_address_with_type */, bool /* is_direct */) { inc_func_call_count(__func__); - return true; } void bluetooth::shim::ACL_IgnoreLeConnectionFrom( const tBLE_BD_ADDR& /* legacy_address_with_type */) { diff --git a/system/test/mock/mock_main_shim_acl_api.h b/system/test/mock/mock_main_shim_acl_api.h index 4f57436f61..782bf4ae55 100644 --- a/system/test/mock/mock_main_shim_acl_api.h +++ b/system/test/mock/mock_main_shim_acl_api.h @@ -47,13 +47,10 @@ namespace main_shim_acl_api { // Params: const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct // Return: bool struct ACL_AcceptLeConnectionFrom { - static bool return_value; - std::function<bool(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct)> body{ - [](const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) { - return return_value; - }}; - bool operator()(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) { - return body(legacy_address_with_type, is_direct); + std::function<void(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct)> body{ + [](const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) {}}; + void operator()(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) { + body(legacy_address_with_type, is_direct); } }; extern struct ACL_AcceptLeConnectionFrom ACL_AcceptLeConnectionFrom; |