From 263a16939854ded66740bdcc8254f13bebc555e2 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 c209c07..627a5ff 100644 --- a/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java +++ b/src/co/aospa/systemui/qs/tiles/dialog/BluetoothDialog.java @@ -275,7 +275,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; }