Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9477e04 authored by Whale Chang's avatar Whale Chang Committed by Automerger Merge Worker
Browse files

Merge "Floss: Fix unable to stream A2DP on telephony use release" into main am: 13c65875

parents b2cbdbfd 13c65875
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1273,6 +1273,14 @@ impl BluetoothMedia {
        };

        debug!("[{}]: UHID: Telephony use: {}", DisplayAddress(&addr), state);
        if state == false {
            // As there's a HID call for each WebHID call, even if it has been answered in the app
            // or pre-exists, and that an app which disconnects from WebHID may not have trigger
            // the UHID_OUTPUT_NONE, we need to remove all pending HID calls on telephony use
            // release to keep lower HF layer in sync and not prevent A2DP streaming
            self.hangup_call_impl();
            self.phone_state_change("".into());
        }
        self.telephony_callbacks.lock().unwrap().for_all_callbacks(|callback| {
            callback.on_telephony_use(address.to_string(), state);
        });