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

Commit a638905a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "leaudio: Fix possible race when confirming stream start" into tm-qpr-dev

parents 56e48df2 85501e63
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -425,6 +425,7 @@ void LeAudioClientAudioSource::Release(const void* instance) {
}

void LeAudioClientAudioSource::ConfirmStreamingRequest() {
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex_);
  LOG(INFO) << __func__;
  if ((sinkClientInterface_ == nullptr) ||
      (le_audio_sink_hal_state != HAL_STARTED)) {
@@ -451,6 +452,7 @@ void LeAudioClientAudioSource::SuspendedForReconfiguration() {
}

void LeAudioClientAudioSource::CancelStreamingRequest() {
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex_);
  LOG(INFO) << __func__;
  if ((sinkClientInterface_ == nullptr) ||
      (le_audio_sink_hal_state != HAL_STARTED)) {