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

Commit c4c9516b authored by En-Shuo Hsu's avatar En-Shuo Hsu Committed by Automerger Merge Worker
Browse files

Merge "Floss: clear a2dp_pending_cmd_ set in StopRequest" am: 3a257c3d

parents fe6beef4 3a257c3d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -242,6 +242,8 @@ void end_session() {

  // Reset remote delay. New value will be set when new session starts.
  remote_delay_report_ = 0;

  a2dp_pending_cmd_ = A2DP_CTRL_CMD_NONE;
}

void set_audio_low_latency_mode_allowed(bool allowed){
+5 −0
Original line number Diff line number Diff line
@@ -751,6 +751,11 @@ impl IBluetoothMedia for BluetoothMedia {
    }

    fn stop_audio_request(&mut self) {
        if !self.a2dp_audio_state.values().any(|state| *state == BtavAudioState::Started) {
            info!("No active stream on A2DP device, ignoring request to stop audio.");
            return;
        }

        match self.a2dp.as_mut() {
            Some(a2dp) => a2dp.stop_audio_request(),
            None => warn!("Uninitialized A2DP to stop audio request"),