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

Commit d2e1ed53 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SecurityManager::CreateBondLe"

parents 8b8c3670 e9e662db
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -697,6 +697,14 @@ static void btif_dm_cb_create_bond(const RawAddress& bd_addr,
    if (status != BT_STATUS_SUCCESS)
      bond_state_changed(status, bd_addr, BT_BOND_STATE_NONE);
  } else {
    if (transport == BTA_TRANSPORT_UNKNOWN) {
      if (device_type & BT_DEVICE_TYPE_BLE) {
        transport = BTA_TRANSPORT_LE;
      } else if (device_type & BT_DEVICE_TYPE_BREDR) {
        transport = BTA_TRANSPORT_BR_EDR;
      }
      LOG_DEBUG(LOG_TAG, "%s guessing transport as %02x ", __func__, transport);
    }
    BTA_DmBond(bd_addr, addr_type, transport);
  }
  /*  Track  originator of bond creation  */
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ hci::Role FixedChannel::GetRole() const {
  return impl_->GetRole();
}

hci::AclConnection* FixedChannel::GetAclConnection() const {
  return impl_->GetAclConnection();
}

void FixedChannel::RegisterOnCloseCallback(os::Handler* user_handler, FixedChannel::OnCloseCallback on_close_callback) {
  l2cap_handler_->Post(common::BindOnce(&internal::FixedChannelImpl::RegisterOnCloseCallback, impl_, user_handler,
                                        std::move(on_close_callback)));
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ class FixedChannel {
   */
  hci::Role GetRole() const;

  hci::AclConnection* GetAclConnection() const;

  /**
   * Register close callback. If close callback is registered, when a channel is closed, the channel's resource will
   * only be freed after on_close callback is invoked. Otherwise, if no on_close callback is registered, the channel's
+4 −0
Original line number Diff line number Diff line
@@ -32,6 +32,10 @@ hci::Role FixedChannelImpl::GetRole() const {
  return link_->GetRole();
}

hci::AclConnection* FixedChannelImpl::GetAclConnection() const {
  return link_->GetAclConnection();
}

FixedChannelImpl::FixedChannelImpl(Cid cid, Link* link, os::Handler* l2cap_handler)
    : cid_(cid), device_(link->GetDevice()), link_(link), l2cap_handler_(l2cap_handler) {
  ASSERT_LOG(cid_ >= kFirstFixedChannel && cid_ <= kLastFixedChannel, "Invalid cid: %d", cid_);
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ class FixedChannelImpl : public l2cap::internal::ChannelImpl {
  /* Return the role we have in the associated link */
  virtual hci::Role GetRole() const;

  virtual hci::AclConnection* GetAclConnection() const;

  virtual void RegisterOnCloseCallback(os::Handler* user_handler, FixedChannel::OnCloseCallback on_close_callback);

  virtual void Acquire();
Loading