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

Commit 08109a61 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

am: bd1a923c

Change-Id: I378f55d65663a1628ca53c1e2a63b850aac94845
parents 20b502a6 bd1a923c
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);
                }
            }