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

Commit b9d6b7fd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Send pairing cancel intent only if pairing in progress"

parents 048abad2 4ea367a4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -437,6 +437,11 @@ final class RemoteDevices {
            intent = new Intent(BluetoothDevice.ACTION_ACL_CONNECTED);
            debugLog("aclStateChangeCallback: State:Connected to Device:" + device);
        } else {
            if (device.getBondState() == BluetoothDevice.BOND_BONDING) {
                /*Broadcasting PAIRING_CANCEL intent as well in this case*/
                intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL);
                mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM);
            }
            intent = new Intent(BluetoothDevice.ACTION_ACL_DISCONNECTED);
            debugLog("aclStateChangeCallback: State:DisConnected to Device:" + device);
        }