diff options
author | 2025-02-21 02:26:32 -0800 | |
---|---|---|
committer | 2025-02-21 02:26:32 -0800 | |
commit | 1e3b951b4f4624b74ee77572c515d460447a10ec (patch) | |
tree | bdd8e06bd469cc990c79ccfd489cb4aacd6bb9a4 /system/test | |
parent | fb75c0c7f5967700a6137b1400871a2cd1c9f664 (diff) | |
parent | 9b1a30c9c0264c516307a82956bb22fcecca46e6 (diff) |
Merge "Get rid of LE Acl Manager shim" into main
Diffstat (limited to 'system/test')
-rw-r--r-- | system/test/mock/mock_main_shim_acl_api.cc | 9 | ||||
-rw-r--r-- | system/test/mock/mock_main_shim_acl_api.h | 32 | ||||
-rw-r--r-- | system/test/mock/mock_stack_btm_dev.cc | 4 |
3 files changed, 2 insertions, 43 deletions
diff --git a/system/test/mock/mock_main_shim_acl_api.cc b/system/test/mock/mock_main_shim_acl_api.cc index f8d1f18fe2..3d257f1a5a 100644 --- a/system/test/mock/mock_main_shim_acl_api.cc +++ b/system/test/mock/mock_main_shim_acl_api.cc @@ -35,14 +35,6 @@ void bluetooth::shim::ACL_CreateClassicConnection(const RawAddress& /* raw_addre void bluetooth::shim::ACL_CancelClassicConnection(const RawAddress& /* raw_address */) { inc_func_call_count(__func__); } -void bluetooth::shim::ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& /* legacy_address_with_type */, - bool /* is_direct */) { - inc_func_call_count(__func__); -} -void bluetooth::shim::ACL_IgnoreLeConnectionFrom( - const tBLE_BD_ADDR& /* legacy_address_with_type */) { - inc_func_call_count(__func__); -} void bluetooth::shim::ACL_ConfigureLePrivacy(bool /* is_le_privacy_enabled */) { inc_func_call_count(__func__); } @@ -54,7 +46,6 @@ void bluetooth::shim::ACL_Disconnect(uint16_t /* handle */, bool /* is_classic * tHCI_STATUS /* reason */, std::string /* comment */) { inc_func_call_count(__func__); } -void bluetooth::shim::ACL_IgnoreAllLeConnections() { inc_func_call_count(__func__); } void bluetooth::shim::ACL_ReadConnectionAddress(uint16_t /* handle */, RawAddress& /* conn_addr */, tBLE_ADDR_TYPE* /* p_addr_type */, bool /* ota_address */) { diff --git a/system/test/mock/mock_main_shim_acl_api.h b/system/test/mock/mock_main_shim_acl_api.h index 782bf4ae55..ab891673e3 100644 --- a/system/test/mock/mock_main_shim_acl_api.h +++ b/system/test/mock/mock_main_shim_acl_api.h @@ -42,19 +42,6 @@ namespace test { namespace mock { namespace main_shim_acl_api { -// Shared state between mocked functions and tests -// Name: ACL_AcceptLeConnectionFrom -// Params: const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct -// Return: bool -struct ACL_AcceptLeConnectionFrom { - 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; - // Name: ACL_AddToAddressResolution // Params: const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& // peer_irk, const Octet16& local_irk Return: void @@ -157,25 +144,6 @@ struct ACL_Disconnect { }; extern struct ACL_Disconnect ACL_Disconnect; -// Name: ACL_IgnoreAllLeConnections -// Params: -// Return: void -struct ACL_IgnoreAllLeConnections { - std::function<void()> body{[]() {}}; - void operator()() { body(); } -}; -extern struct ACL_IgnoreAllLeConnections ACL_IgnoreAllLeConnections; - -// Name: ACL_IgnoreLeConnectionFrom -// Params: const tBLE_BD_ADDR& legacy_address_with_type -// Return: void -struct ACL_IgnoreLeConnectionFrom { - std::function<void(const tBLE_BD_ADDR& legacy_address_with_type)> body{ - [](const tBLE_BD_ADDR& legacy_address_with_type) {}}; - void operator()(const tBLE_BD_ADDR& legacy_address_with_type) { body(legacy_address_with_type); } -}; -extern struct ACL_IgnoreLeConnectionFrom ACL_IgnoreLeConnectionFrom; - // Name: ACL_ReadConnectionAddress // Params: uint16_t handle, RawAddress& conn_addr, tBLE_ADDR_TYPE*, bool // p_addr_type Return: void diff --git a/system/test/mock/mock_stack_btm_dev.cc b/system/test/mock/mock_stack_btm_dev.cc index 1dc2da8646..60f88b0d6e 100644 --- a/system/test/mock/mock_stack_btm_dev.cc +++ b/system/test/mock/mock_stack_btm_dev.cc @@ -111,9 +111,9 @@ bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type) { inc_func_call_count(__func__); return test::mock::stack_btm_dev::maybe_resolve_address(bda, bda_type); } -const tBLE_BD_ADDR BTM_Sec_GetAddressWithType(const RawAddress& /* bd_addr */) { +const tBLE_BD_ADDR BTM_Sec_GetAddressWithType(const RawAddress& bd_addr) { inc_func_call_count(__func__); - return {}; + return tBLE_BD_ADDR{.type = BLE_ADDR_PUBLIC, .bda = bd_addr}; } void DumpsysRecord(int /* fd */) { inc_func_call_count(__func__); } |