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

Commit 0c0c30e4 authored by Chris Manton's avatar Chris Manton
Browse files

gd: Authenticate only if necessary

If a device are pairing but not bonding then
authenticate may get called twice, once when
the channel is set up and again when the
pairing manager is launched.

Bug: 149524116
Test: bluetooth_test_gd

Change-Id: Icddecd549030ade41e5679d46580881b56833d9e
parent 6e38c307
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -116,7 +116,9 @@ Link* LinkManager::GetLink(const hci::Address device) {
}

void LinkManager::TriggerPairing(Link* link) {
  if (!link->IsAuthenticated()) {
    link->Authenticate();
  }
  link->ReadRemoteVersionInformation();
  link->ReadRemoteSupportedFeatures();
  link->ReadRemoteExtendedFeatures();