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

Commit 7e420313 authored by Nitin Shivpure's avatar Nitin Shivpure Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: Remove remote device from trust list on BOND change

A special case where remote device is paired & authorized by
DUT. Remote device is unpaired by itself & try to connect again.
In this scenario Link key is deleted from remote device. So
SSP is performed again. & remote device bond state is changed
to BOND_BONDING from BOND_BONDED on DUT while SSP, As it was
in DUT BONDED list. So permission/trust info for all profile
need to be false when it's moved to BOND_BONDING to solve the
issue.

Change-Id: Ibf54992e09d5cfcaf36b12eda443daee046d0721
CRs-Fixed: 578523
parent a880982c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -257,6 +257,12 @@ class AdapterProperties {
                    debugLog("Removing bonded device:" +  device);
                else
                    debugLog("Failed to remove device: " + device);
            } else if (state == BluetoothDevice.BOND_BONDING) {
                // Setting remote trust to false on BONDING state if it's already in BONDED list
                if (mBondedDevices.contains(device)) {
                    boolean result = mService.setRemoteTrust(device, false);
                    debugLog("onBondStateChanged result=" + result);
                }
            }
        }
        catch(Exception ee) {