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

Commit 9e24f370 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "Make allow_low_latency run on main thread" into main

parents 78544b07 819733cd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1049,7 +1049,15 @@ static int set_dynamic_audio_buffer_size(int codec, int size) {
static bool allow_low_latency_audio(bool allowed,
                                    const RawAddress& /* address */) {
  log::info("{}", allowed);
  if (com::android::bluetooth::flags::a2dp_async_allow_low_latency()) {
    do_in_main_thread(
        FROM_HERE,
        base::BindOnce(
            bluetooth::audio::a2dp::set_audio_low_latency_mode_allowed,
            allowed));
  } else {
    bluetooth::audio::a2dp::set_audio_low_latency_mode_allowed(allowed);
  }
  return true;
}