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

Commit 017a49c9 authored by Chris Manton's avatar Chris Manton
Browse files

Re-order stack startup/shutdown with btm

The btm portion is more framework than layer and may
used by the shim/gd immediately at startup.

Bug: 229906389
Tag: #refactor
Test: gd/cert/run
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Ignore-AOSP-First: cherry-pick

Merged-In: Iba0ddc183aa8b45156d76d64f5473baf3e2f65fd
Change-Id: Iba0ddc183aa8b45156d76d64f5473baf3e2f65fd
parent f9127f65
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -286,10 +286,10 @@ static void event_start_up_stack(UNUSED_ATTR void* context) {


  LOG_INFO("%s Gd shim module enabled", __func__);
  LOG_INFO("%s Gd shim module enabled", __func__);
  module_shut_down(get_local_module(GD_IDLE_MODULE));
  module_shut_down(get_local_module(GD_IDLE_MODULE));
  get_btm_client_interface().lifecycle.btm_init();
  module_start_up(get_local_module(GD_SHIM_MODULE));
  module_start_up(get_local_module(GD_SHIM_MODULE));
  module_start_up(get_local_module(BTIF_CONFIG_MODULE));
  module_start_up(get_local_module(BTIF_CONFIG_MODULE));


  get_btm_client_interface().lifecycle.btm_init();
  l2c_init();
  l2c_init();
  sdp_init();
  sdp_init();
  gatt_init();
  gatt_init();
@@ -381,10 +381,10 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
  l2c_free();
  l2c_free();
  sdp_free();
  sdp_free();
  get_btm_client_interface().lifecycle.btm_ble_free();
  get_btm_client_interface().lifecycle.btm_ble_free();
  get_btm_client_interface().lifecycle.btm_free();


  LOG_INFO("%s Gd shim module disabled", __func__);
  LOG_INFO("%s Gd shim module disabled", __func__);
  module_shut_down(get_local_module(GD_SHIM_MODULE));
  module_shut_down(get_local_module(GD_SHIM_MODULE));
  get_btm_client_interface().lifecycle.btm_free();
  module_start_up(get_local_module(GD_IDLE_MODULE));
  module_start_up(get_local_module(GD_IDLE_MODULE));


  hack_future = future_new();
  hack_future = future_new();