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

Commit 26fda9af authored by Ash_Chen's avatar Ash_Chen
Browse files

Filter out the connected device in "Available devices" screen(2/2)

Don't add connected devices under "Available devices"

Bug: 113568981
Test: Bluetooth Pairing Test with some devices and accessories
Change-Id: If5596d0d77e4a470166b6ce269baf47f34d5e397
parent aaf60895
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -267,8 +267,10 @@ public class BluetoothEventManager {
                cachedDevice = mDeviceManager.addDevice(device);
                Log.d(TAG, "DeviceFoundHandler created new CachedBluetoothDevice: "
                        + cachedDevice);
            } else if (cachedDevice.getBondState() == BluetoothDevice.BOND_BONDED) {
                // Dispatch device add callback to show bonded BT device in discovery mode
            } else if (cachedDevice.getBondState() == BluetoothDevice.BOND_BONDED
                    &&!cachedDevice.getDevice().isConnected()) {
                // Dispatch device add callback to show bonded but
                // not connected devices in discovery mode
                dispatchDeviceAdded(cachedDevice);
            }
            cachedDevice.setRssi(rssi);