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

Commit 04c02cf7 authored by Pramod Sivaraman's avatar Pramod Sivaraman Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: Security: Add Null check during pairing cancel intent.

Added null check, so before posing event we can restrict events,
if cached device list is empty

Change-Id: I458d181abe5eec2497b80b1713ddbc3502b79786
CRs-Fixed: 546364
(cherry picked from commit 7d7222c3e5c1054b4e2f3e59cc40cb182a72b040)
(cherry picked from commit 8ce523155dd030d82c32cf502d317023b017645b)
(cherry picked from commit 938686e749bca911e5f63150223116d1c381da8e)
parent 901a674a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -387,9 +387,11 @@ final class BluetoothEventManager {
            }
            int errorMsg = R.string.bluetooth_pairing_error_message;
            CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device);
            if (context != null && cachedDevice != null) {
                Utils.showError(context, cachedDevice.getName(), errorMsg);
            }
        }
    }

    private class DockEventHandler implements Handler {
        public void onReceive(Context context, Intent intent, BluetoothDevice device) {