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

Commit 8762507a authored by William Escande's avatar William Escande Committed by Gerrit Code Review
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
parents ebd02782 51b8f535
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");
}