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

Commit 91d40ea5 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Let LinkSecurityInterface know LL role am: e9714168

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

Change-Id: Ie31e11ce0b183b20b8569cd5cd711388f09ef964
parents 2d0e21d6 e9714168
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ void Link::OnFlushOccurred() {
  LOG_INFO("UNIMPLEMENTED %s", __func__);
}
void Link::OnRoleDiscoveryComplete(hci::Role current_role) {
  LOG_INFO("UNIMPLEMENTED %s current_role:%s", __func__, hci::RoleText(current_role).c_str());
  role_ = current_role;
}
void Link::OnReadLinkPolicySettingsComplete(uint16_t link_policy_settings) {
  LOG_INFO("UNIMPLEMENTED %s link_policy_settings:0x%x", __func__, link_policy_settings);
+5 −0
Original line number Diff line number Diff line
@@ -187,6 +187,10 @@ class Link : public l2cap::internal::ILink, public hci::acl_manager::ConnectionM
    return acl_handle_;
  }

  hci::Role GetRole() const {
    return role_;
  }

 private:
  friend class DumpsysHelper;
  void connect_to_pending_dynamic_channels();
@@ -206,6 +210,7 @@ class Link : public l2cap::internal::ILink, public hci::acl_manager::ConnectionM
  ClassicSignallingManager signalling_manager_;
  uint16_t acl_handle_;
  Mtu remote_connectionless_mtu_ = kMinimumClassicMtu;
  hci::Role role_ = hci::Role::CENTRAL;
  bool remote_extended_feature_received_ = false;
  bool remote_supports_ertm_ = false;
  bool remote_supports_fcs_ = false;
+4 −0
Original line number Diff line number Diff line
@@ -203,6 +203,10 @@ class LinkSecurityInterfaceImpl : public LinkSecurityInterface {
    return acl_handle_;
  }

  hci::Role GetRole() override {
    return link_manager_->GetLink(remote_)->GetRole();
  }

  os::Handler* handler_;
  LinkManager* link_manager_;
  hci::Address remote_;
+4 −0
Original line number Diff line number Diff line
@@ -81,6 +81,10 @@ class LinkSecurityInterface {
  virtual void EnsureEncrypted() = 0;

  virtual uint16_t GetAclHandle() = 0;

  virtual hci::Role GetRole() {
    return hci::Role::CENTRAL;
  }
};

class LinkSecurityInterfaceListener {