~aleteoryx/muditaos

e588ee047b63348cea24814ac56a86efcb06594b — Bartosz Cichocki 4 years ago 317baa0
[EGD-7761] Fix HFP reconnect

After connecting to another device while it was connected
HFP didn't disconnect from the previous one
1 files changed, 4 insertions(+), 3 deletions(-)

M module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp
M module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp => module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp +4 -3
@@ 387,10 387,11 @@ namespace bluetooth

    void HFP::HFPImpl::connect()
    {
        if (!isConnected) {
            LOG_DEBUG("Connecting the HFP profile");
            hfp_ag_establish_service_level_connection(device.address);
        if (isConnected) {
            disconnect();
        }
        LOG_DEBUG("Connecting the HFP profile");
        hfp_ag_establish_service_level_connection(device.address);
    }

    void HFP::HFPImpl::disconnect()