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

Commit d96321ae authored by Chris Manton's avatar Chris Manton
Browse files

Check gd::controller started before shim::Acl constructed

Bug: 229432405
Tag: #refactor
Test: gd/cert/run
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I13bb5bbd0f3052cc917a6ac4a2fe534f1ff84b6c
parent 826a70d6
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -179,11 +179,17 @@ void Stack::StartEverything() {
                   stack_manager_.GetInstance<neighbor::InquiryModule>());
  }
  if (!common::init_flags::gd_core_is_enabled()) {
    if (stack_manager_.IsStarted<hci::Controller>()) {
      acl_ = new legacy::Acl(
          stack_handler_, legacy::GetAclInterface(),
          controller_get_interface()->get_ble_acceptlist_size(),
          controller_get_interface()->get_ble_resolving_list_max_size());
    } else {
      LOG_ERROR(
          "Unable to create shim ACL layer as Controller has not started");
    }
  }

  if (!common::init_flags::gd_core_is_enabled()) {
    bluetooth::shim::hci_on_reset_complete();
  }