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

Commit 08559209 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "Delay the start of ranging until the rust module starts, since GATT...

Merge "Delay the start of ranging until the rust module starts, since GATT server depends on the rust module." into main am: 8762507a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3407747



Change-Id: I4b0ce6d9a11e20982bec8ce4aaf774086f5380f0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fa68cc47 8762507a
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -330,11 +330,11 @@ static void event_start_up_stack(bluetooth::core::CoreInterface* interface,
  if (!com::android::bluetooth::flags::scan_manager_refactor()) {
    info("Starting rust module");
    module_start_up(get_local_module(RUST_MODULE));
  }
    if (com::android::bluetooth::flags::channel_sounding_in_stack()) {
      bluetooth::ras::GetRasServer()->Initialize();
      bluetooth::ras::GetRasClient()->Initialize();
    }
  }

  stack_is_running = true;
  info("finished");
@@ -395,6 +395,11 @@ static void event_shut_down_stack(ProfileStopCallback stopProfiles) {
static void event_start_up_rust_module(std::promise<void> promise) {
  info("is bringing up the Rust module");
  module_start_up(get_local_module(RUST_MODULE));
  if (com::android::bluetooth::flags::channel_sounding_in_stack()) {
    // GATT server requires the rust module to be running
    bluetooth::ras::GetRasServer()->Initialize();
    bluetooth::ras::GetRasClient()->Initialize();
  }
  promise.set_value();
  info("finished");
}