From b50ecb0639f0a3021043a1a96c88189daaeb4942 Mon Sep 17 00:00:00 2001 From: Ido Ben-Hur Date: Sat, 16 Dec 2023 15:35:53 +0200 Subject: [PATCH] ParanoidSystemUI: BluetoothDialog: Don't ever show non paired devices Hppens right after we forget a device. It also annoyingly shows first in the list Change-Id: Ia641e8d15043a303d769ba6968590d864523b647 Signed-off-by: Adithya R --- src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java b/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java index b874cbd..977fff8 100644 --- a/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java +++ b/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java @@ -279,7 +279,10 @@ public class BluetoothDialog extends SystemUIDialog implements Window.Callback { if (devices == null) return null; if (devices.size() <= 1) return devices; Collection sorted = new ArrayList<>(); - devices.stream().sorted(new BtDeviceComparator()).forEach(sorted::add); + devices.stream().sorted(new BtDeviceComparator()).forEach(device -> { + if (device.getDevice().getBondState() != BluetoothDevice.BOND_NONE) + sorted.add(device); + }); return sorted; }