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

Commit 9d8b6ede authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Pull various Inits into parent tBTM_CB::Init structure am: 185cd018 am: 57ca0c73 am: 4938cd5b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1552709

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idd4ce7551bf228fe0b6a8814476e2aa47ad35dd7
parents 6bce3419 4938cd5b
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -343,9 +343,24 @@ typedef struct {
    security_mode = initial_security_mode;
    pairing_bda = RawAddress::kAny;
    sec_dev_rec = list_new(osi_free);

    /* Initialize BTM component structures */
    btm_inq_vars.Init(); /* Inquiry Database and Structures */
    acl_cb_.Init();      /* ACL Database and Structures */
    sco_cb.Init();       /* SCO Database and Structures (If included) */
    devcb.Init();

    history_ = std::make_shared<TimestampedStringCircularBuffer>(40);
    CHECK(history_ != nullptr);
    history_->Push(std::string("Initialized btm history"));
  }

  void Free() {
    history_.reset();

    devcb.Free();
    btm_inq_vars.Free();

    fixed_queue_free(page_queue, nullptr);
    page_queue = nullptr;