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

Commit 98393c6f authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Ignore duplicate remove device request

A "pending remove" entry is created when the removeBond() is requested
but the device is not disconnected. If another removeBond() is requested
for the same device before first one is concluded, another entry is
created. As all the transports are disconnected, the first entry is
serviced. But the second entry may remain their preventing further
connections to the same device.
This change ignores the duplicate remove device request.

Test: mmm packages/modules/Bluetooth
Bug: 339784340
Flag: EXEMPT bugfix
Change-Id: I73747684f8eab2cc4a016d8cd458c00b9c672f2c
parent a0b54258
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -566,6 +566,11 @@ void bta_dm_remove_device(const RawAddress& target) {
    return;
  }

  if (bta_dm_removal_pending(target)) {
    log::warn("{} already getting removed", target);
    return;
  }

  // Find all aliases and connection status on all transports
  RawAddress pseudo_addr = target;
  RawAddress identity_addr = target;