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

Commit 46fe0af0 authored by Martin Brabham's avatar Martin Brabham
Browse files

Ensure we delete the link key from the controller.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I883bf501d7a1f95e3c4665ffdf0fdee6af67453c
parent d0ab2373
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -146,12 +146,10 @@ void SecurityManagerImpl::CancelBond(hci::AddressWithType device) {


void SecurityManagerImpl::RemoveBond(hci::AddressWithType device) {
void SecurityManagerImpl::RemoveBond(hci::AddressWithType device) {
  CancelBond(device);
  CancelBond(device);
  security_database_.Remove(device);
  security_manager_channel_->Disconnect(device.GetAddress());
  security_manager_channel_->Disconnect(device.GetAddress());
  // Signal disconnect
  security_database_.Remove(device);
  // Remove security record
  security_manager_channel_->SendCommand(
  // Signal Remove from database
      hci::DeleteStoredLinkKeyBuilder::Create(device.GetAddress(), hci::DeleteStoredLinkKeyDeleteAllFlag::ALL));

  NotifyDeviceUnbonded(device);
  NotifyDeviceUnbonded(device);
}
}