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

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

Use btm_cb.devcb.Init

Towards encapsulated code

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

Change-Id: Ic8fa0c8888e0252edd8081d547ae6189610f9926
parent 86c46790
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@
*/
tBTM_CB btm_cb;

extern void btm_dev_init(void);
extern void btm_dev_free(void);
extern void btm_inq_db_init(void);
extern void btm_inq_db_free(void);
extern void btm_sco_init(void);
@@ -64,7 +62,7 @@ void btm_init(void) {
  btm_cb.acl_cb_.Init(); /* ACL Database and Structures */
  btm_sco_init(); /* SCO Database and Structures (If included) */

  btm_dev_init(); /* Device Manager Structures & HCI_Reset */
  btm_cb.devcb.Init();

  btm_cb.history_ = std::make_shared<TimestampedStringCircularBuffer>(40);
  CHECK(btm_cb.history_ != nullptr);
@@ -75,7 +73,7 @@ void btm_init(void) {
void btm_free(void) {
  btm_cb.history_.reset();

  btm_dev_free();
  btm_cb.devcb.Free();
  btm_inq_db_free();

  btm_cb.Free();