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

Commit 7054e598 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BTAudio: report session ended after cleaning up" am: 5ae00867 am:...

Merge "BTAudio: report session ended after cleaning up" am: 5ae00867 am: 5373028c am: 3c1ec94c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1371705

Change-Id: Ib93c49b8caaba44ec5fc73f07db17ce85fb03501
parents de2a8904 3c1ec94c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -90,14 +90,16 @@ void BluetoothAudioSession::OnSessionStarted(
// bluetooth_audio outputs
void BluetoothAudioSession::OnSessionEnded() {
  std::lock_guard<std::recursive_mutex> guard(mutex_);
  if (IsSessionReady()) {
    ReportSessionStatus();
  }
  bool toggled = IsSessionReady();
  LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
  audio_config_ = (session_type_ == SessionType::A2DP_HARDWARE_OFFLOAD_DATAPATH
                       ? kInvalidOffloadAudioConfiguration
                       : kInvalidSoftwareAudioConfiguration);
  stack_iface_ = nullptr;
  UpdateDataPath(nullptr);
  if (toggled) {
    ReportSessionStatus();
  }
}

// invoking the registered session_changed_cb_