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

Commit 2b385567 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "btif_a2dp_source: Call btif_a2dp_source_shutdown_delayed with no scheduling" into main

parents 8106c85b 455efeec
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -574,8 +574,13 @@ void btif_a2dp_source_shutdown(std::promise<void> shutdown_complete_promise) {
  /* Make sure no channels are restarted while shutting down */
  btif_a2dp_source_cb.SetState(BtifA2dpSource::kStateShuttingDown);

  // TODO(b/374166531) Remove the check for get_main_thread.
  if (local_thread() != get_main_thread()) {
    local_thread()->DoInThread(FROM_HERE, base::BindOnce(&btif_a2dp_source_shutdown_delayed,
                                                         std::move(shutdown_complete_promise)));
  } else {
    btif_a2dp_source_shutdown_delayed(std::move(shutdown_complete_promise));
  }
}

static void btif_a2dp_source_shutdown_delayed(std::promise<void> shutdown_complete_promise) {