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

Commit 5373028c 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

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

Change-Id: I949cda51cab15b437f9168caa6c5ae841cdf16e8
parents c164e01c 5ae00867
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_