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

Commit 99c68807 authored by Chris Manton's avatar Chris Manton
Browse files

Add connection address into gd connection

Bug: 203417776
Tag: #refactor
Test: gd/cert/run

Change-Id: Id19a0cda5898a0496b358c385c887534e414381e
parent c246249a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ class LeAclConnection : public AclConnection {
    return role_;
  }

  // The peer address and type returned from the Connection Complete Event
  AddressWithType peer_address_with_type_;

  virtual void RegisterCallbacks(LeConnectionManagementCallbacks* callbacks, os::Handler* handler);
  virtual void Disconnect(DisconnectReason reason);

+2 −0
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    round_robin_scheduler_->Register(RoundRobinScheduler::ConnectionType::LE, handle, queue);
    std::unique_ptr<LeAclConnection> connection(new LeAclConnection(
        std::move(queue), le_acl_connection_interface_, handle, local_address, remote_address, role));
    connection->peer_address_with_type_ = AddressWithType(address, peer_address_type);
    connection_proxy.le_connection_management_callbacks_ = connection->GetEventCallbacks();
    le_client_handler_->Post(common::BindOnce(&LeConnectionCallbacks::OnLeConnectSuccess,
                                              common::Unretained(le_client_callbacks_), remote_address,
@@ -270,6 +271,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    round_robin_scheduler_->Register(RoundRobinScheduler::ConnectionType::LE, handle, queue);
    std::unique_ptr<LeAclConnection> connection(new LeAclConnection(
        std::move(queue), le_acl_connection_interface_, handle, local_address, remote_address, role));
    connection->peer_address_with_type_ = AddressWithType(address, peer_address_type);
    connection_proxy.le_connection_management_callbacks_ = connection->GetEventCallbacks();
    le_client_handler_->Post(common::BindOnce(&LeConnectionCallbacks::OnLeConnectSuccess,
                                              common::Unretained(le_client_callbacks_), remote_address,