From ed431b17089634904ac85035aa571c3a70af94a3 Mon Sep 17 00:00:00 2001 From: Jakub Pyszczak Date: Wed, 24 Nov 2021 12:28:29 +0100 Subject: [PATCH] [EGD-7875] Fixed bt not ringing Fixed bluetooth not ringing after bt call hang up. --- module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp | 2 +- module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp b/module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp index a9cd7d9810070279221b1dcba558df0279b90caa..01758ee59ac28605bde2bf8bc443f00651395bf1 100644 --- a/module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp +++ b/module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp @@ -276,7 +276,7 @@ namespace bluetooth scoHandle = HCI_CON_HANDLE_INVALID; isAudioRouted = false; isAudioConnectionEstablished = false; - sendAudioEvent(audio::EventType::BlutoothHFPDeviceState, audio::Event::DeviceState::Disconnected); + audioDevice.reset(); break; case HFP_SUBEVENT_START_RINGING: LOG_DEBUG("Start Ringing\n"); diff --git a/module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp b/module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp index 334b89f3cb25bce1f9767c694ca44e8b592f73f4..05e7486f7577370571dc1d4b07d54852e3d5cf62 100644 --- a/module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp +++ b/module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp @@ -200,9 +200,9 @@ namespace bluetooth if (hsp_subevent_audio_connection_complete_get_status(event) != 0u) { LOG_DEBUG("Audio connection establishment failed with status %u\n", hsp_subevent_audio_connection_complete_get_status(event)); - sendAudioEvent(audio::EventType::BlutoothHSPDeviceState, audio::Event::DeviceState::Disconnected); isConnected = false; callAnswered = false; + audioDevice.reset(); } else { scoHandle = hsp_subevent_audio_connection_complete_get_handle(event);