Loading system/stack/acl/btm_ble_connection_establishment.cc +0 −28 Original line number Diff line number Diff line Loading @@ -98,31 +98,3 @@ bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type) { } return is_in_security_db; } void btm_ble_create_conn_cancel_complete(uint8_t* p) { uint8_t status; STREAM_TO_UINT8(status, p); if (status != HCI_SUCCESS) { // Only log errors to prevent log spam due to acceptlist connections log_link_layer_connection_event( nullptr, bluetooth::common::kUnknownConnectionHandle, android::bluetooth::DIRECTION_OUTGOING, android::bluetooth::LINK_TYPE_ACL, android::bluetooth::hci::CMD_BLE_CREATE_CONN_CANCEL, android::bluetooth::hci::EVT_COMMAND_COMPLETE, android::bluetooth::hci::BLE_EVT_UNKNOWN, status, android::bluetooth::hci::STATUS_UNKNOWN); } if (status == HCI_ERR_COMMAND_DISALLOWED) { /* This is a sign that logic around keeping connection state is broken */ LOG(ERROR) << "Attempt to cancel LE connection, when no connection is pending."; if (btm_cb.ble_ctr_cb.is_connection_state_cancelled()) { btm_cb.ble_ctr_cb.set_connection_state_idle(); btm_ble_clear_topology_mask(BTM_BLE_STATE_INIT_BIT); btm_ble_update_mode_operation(HCI_ROLE_UNKNOWN, nullptr, static_cast<tHCI_STATUS>(status)); } } } system/stack/include/ble_hci_link_interface.h +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ extern bool btm_identity_addr_to_random_pseudo_from_address_with_type( tBLE_BD_ADDR* address_with_type, bool refresh); extern void btm_ble_read_resolving_list_entry_complete(const uint8_t* p, uint16_t evt_len); extern void btm_ble_create_conn_cancel_complete(uint8_t* p); extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len); extern void btm_ble_add_resolving_list_entry_complete(uint8_t* p, Loading system/test/mock/mock_stack_acl_btm_ble_connection_establishment.cc +0 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ namespace stack_acl_btm_ble_connection_establishment { struct btm_ble_create_ll_conn_complete btm_ble_create_ll_conn_complete; struct maybe_resolve_address maybe_resolve_address; struct btm_ble_conn_complete btm_ble_conn_complete; struct btm_ble_create_conn_cancel_complete btm_ble_create_conn_cancel_complete; } // namespace stack_acl_btm_ble_connection_establishment } // namespace mock Loading @@ -74,10 +73,5 @@ void btm_ble_conn_complete(uint8_t* p, uint16_t evt_len, bool enhanced) { test::mock::stack_acl_btm_ble_connection_establishment::btm_ble_conn_complete( p, evt_len, enhanced); } void btm_ble_create_conn_cancel_complete(uint8_t* p) { mock_function_count_map[__func__]++; test::mock::stack_acl_btm_ble_connection_establishment:: btm_ble_create_conn_cancel_complete(p); } // END mockcify generation system/test/mock/mock_stack_acl_btm_ble_connection_establishment.h +0 −9 Original line number Diff line number Diff line Loading @@ -78,15 +78,6 @@ struct btm_ble_conn_complete { }; }; extern struct btm_ble_conn_complete btm_ble_conn_complete; // Name: btm_ble_create_conn_cancel_complete // Params: uint8_t* p // Returns: void struct btm_ble_create_conn_cancel_complete { std::function<void(uint8_t* p)> body{[](uint8_t* p) {}}; void operator()(uint8_t* p) { body(p); }; }; extern struct btm_ble_create_conn_cancel_complete btm_ble_create_conn_cancel_complete; } // namespace stack_acl_btm_ble_connection_establishment } // namespace mock Loading Loading
system/stack/acl/btm_ble_connection_establishment.cc +0 −28 Original line number Diff line number Diff line Loading @@ -98,31 +98,3 @@ bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type) { } return is_in_security_db; } void btm_ble_create_conn_cancel_complete(uint8_t* p) { uint8_t status; STREAM_TO_UINT8(status, p); if (status != HCI_SUCCESS) { // Only log errors to prevent log spam due to acceptlist connections log_link_layer_connection_event( nullptr, bluetooth::common::kUnknownConnectionHandle, android::bluetooth::DIRECTION_OUTGOING, android::bluetooth::LINK_TYPE_ACL, android::bluetooth::hci::CMD_BLE_CREATE_CONN_CANCEL, android::bluetooth::hci::EVT_COMMAND_COMPLETE, android::bluetooth::hci::BLE_EVT_UNKNOWN, status, android::bluetooth::hci::STATUS_UNKNOWN); } if (status == HCI_ERR_COMMAND_DISALLOWED) { /* This is a sign that logic around keeping connection state is broken */ LOG(ERROR) << "Attempt to cancel LE connection, when no connection is pending."; if (btm_cb.ble_ctr_cb.is_connection_state_cancelled()) { btm_cb.ble_ctr_cb.set_connection_state_idle(); btm_ble_clear_topology_mask(BTM_BLE_STATE_INIT_BIT); btm_ble_update_mode_operation(HCI_ROLE_UNKNOWN, nullptr, static_cast<tHCI_STATUS>(status)); } } }
system/stack/include/ble_hci_link_interface.h +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ extern bool btm_identity_addr_to_random_pseudo_from_address_with_type( tBLE_BD_ADDR* address_with_type, bool refresh); extern void btm_ble_read_resolving_list_entry_complete(const uint8_t* p, uint16_t evt_len); extern void btm_ble_create_conn_cancel_complete(uint8_t* p); extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len); extern void btm_ble_add_resolving_list_entry_complete(uint8_t* p, Loading
system/test/mock/mock_stack_acl_btm_ble_connection_establishment.cc +0 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ namespace stack_acl_btm_ble_connection_establishment { struct btm_ble_create_ll_conn_complete btm_ble_create_ll_conn_complete; struct maybe_resolve_address maybe_resolve_address; struct btm_ble_conn_complete btm_ble_conn_complete; struct btm_ble_create_conn_cancel_complete btm_ble_create_conn_cancel_complete; } // namespace stack_acl_btm_ble_connection_establishment } // namespace mock Loading @@ -74,10 +73,5 @@ void btm_ble_conn_complete(uint8_t* p, uint16_t evt_len, bool enhanced) { test::mock::stack_acl_btm_ble_connection_establishment::btm_ble_conn_complete( p, evt_len, enhanced); } void btm_ble_create_conn_cancel_complete(uint8_t* p) { mock_function_count_map[__func__]++; test::mock::stack_acl_btm_ble_connection_establishment:: btm_ble_create_conn_cancel_complete(p); } // END mockcify generation
system/test/mock/mock_stack_acl_btm_ble_connection_establishment.h +0 −9 Original line number Diff line number Diff line Loading @@ -78,15 +78,6 @@ struct btm_ble_conn_complete { }; }; extern struct btm_ble_conn_complete btm_ble_conn_complete; // Name: btm_ble_create_conn_cancel_complete // Params: uint8_t* p // Returns: void struct btm_ble_create_conn_cancel_complete { std::function<void(uint8_t* p)> body{[](uint8_t* p) {}}; void operator()(uint8_t* p) { body(p); }; }; extern struct btm_ble_create_conn_cancel_complete btm_ble_create_conn_cancel_complete; } // namespace stack_acl_btm_ble_connection_establishment } // namespace mock Loading