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

Commit 6e6d2362 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I25f2afba into eclair

* changes:
  Check if a device is added to the cache before returning.
parents 85ed0862 fca3c1cf
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -172,9 +172,15 @@ public class CachedBluetoothDeviceManager {
            if (!readPairedDevices()) {
            if (!readPairedDevices()) {
                Log.e(TAG, "Got bonding state changed for " + device +
                Log.e(TAG, "Got bonding state changed for " + device +
                        ", but we have no record of that device.");
                        ", but we have no record of that device.");
                return;
            }
            }
            cachedDevice = findDevice(device);
            if (cachedDevice == null) {
                Log.e(TAG, "Got bonding state changed for " + device +
                        "but device not added in cache");
                return;
                return;
            }
            }
        }


        cachedDevice.onBondingStateChanged(bondState);
        cachedDevice.onBondingStateChanged(bondState);