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

Commit 5642dda2 authored by Zach Johnson's avatar Zach Johnson
Browse files

Pull out bta_ar_init from bta_sys_init

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a73f3bef8ee0e057f87cad440edff8247166a78
parent 083ea668
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -40,9 +40,6 @@
#include "osi/include/osi.h"
#include "utl.h"

#if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE)
#include "bta_ar_api.h"
#endif

void BTA_dm_on_hw_on();
void BTA_dm_on_hw_error();
@@ -68,10 +65,6 @@ uint8_t btif_trace_level = BT_TRACE_LEVEL_WARNING;
 ******************************************************************************/
void bta_sys_init(void) {
  memset(&bta_sys_cb, 0, sizeof(tBTA_SYS_CB));

#if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE)
  bta_ar_init();
#endif
}

void bta_sys_free(void) {
+6 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@
#include "stack/include/hidh_api.h"
#endif
#include "stack/include/smp_api.h"
#if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE)
#include "bta_ar_api.h"
#endif

using bluetooth::common::MessageLoopThread;

@@ -210,6 +213,9 @@ static void event_start_up_stack(UNUSED_ATTR void* context) {
#endif

  bta_sys_init();
#if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE)
  bta_ar_init();
#endif
  module_init(get_module(BTE_LOGMSG_MODULE));

  main_thread_start_up();