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

Commit 3308f182 authored by Chris Manton's avatar Chris Manton
Browse files

Use btm_client_interface::init,free

Towards modular code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Iba73720c0ded4b6091ad2bbec1ff4d9225fa731d
parent 067f8faf
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "osi/include/osi.h"
#include "osi/include/semaphore.h"
#include "stack/include/acl_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btu.h"

// Temp includes
@@ -74,8 +75,6 @@ void main_thread_shut_down();
void main_thread_start_up();
void BTA_dm_on_hw_on();
void BTA_dm_on_hw_off();
extern void btm_init(void);
extern void btm_free(void);

using bluetooth::common::MessageLoopThread;

@@ -204,12 +203,12 @@ static void event_start_up_stack(UNUSED_ATTR void* context) {
    module_start_up(get_module(HCI_MODULE));
  }

  btm_init();
  get_btm_client_interface().lifecycle.btm_init();
  l2c_init();
  sdp_init();
  gatt_init();
  SMP_Init();
  btm_ble_init();
  get_btm_client_interface().lifecycle.btm_ble_init();

  RFCOMM_Init();
#if (BNEP_INCLUDED == TRUE)
@@ -298,8 +297,8 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
  gatt_free();
  l2c_free();
  sdp_free();
  btm_ble_free();
  btm_free();
  get_btm_client_interface().lifecycle.btm_ble_free();
  get_btm_client_interface().lifecycle.btm_free();

  if (bluetooth::shim::is_any_gd_enabled()) {
    LOG_INFO("%s Gd shim module disabled", __func__);