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

Commit bd1a923c authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Fix Bluetooth OOB pairing not working for unseen devices"

am: 3ef0315e

Change-Id: I05f7aaf1f0bdbffb6ef21e9250631633debb6b8b
parents 72510e62 3ef0315e
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -268,16 +268,16 @@ public final class BluetoothEventManager {
            if (cachedDevice == null) {
                Log.w(TAG, "CachedBluetoothDevice for device " + device +
                        " not found, calling readPairedDevices().");
                if (!readPairedDevices()) {
                    Log.e(TAG, "Got bonding state changed for " + device +
                            ", but we have no record of that device.");
                    return;
                }
                if (readPairedDevices()) {
                    cachedDevice = mDeviceManager.findDevice(device);
                }

                if (cachedDevice == null) {
                    Log.e(TAG, "Got bonding state changed for " + device +
                            ", but device not added in cache.");
                    return;
                    Log.w(TAG, "Got bonding state changed for " + device +
                            ", but we have no record of that device.");

                    cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device);
                    dispatchDeviceAdded(cachedDevice);
                }
            }