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

Commit 0763466e authored by Kiran Kelageri's avatar Kiran Kelageri Committed by Bruno Martins
Browse files

Bluetooth-TWS: Filter TWS devices

Added filter to display TWS devices only
under saved earbuds category.

CRs-Fixed: 2285057
Change-Id: Id254210a4a308360e0f2110d6b81d8a3a780bd38
parent f513576e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,9 +75,10 @@ public class SavedBluetoothTwsDeviceUpdater extends BluetoothDeviceUpdater {

    @Override
    public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {
        final BluetoothDevice device = cachedDevice.getDevice();
        if (state == BluetoothAdapter.STATE_CONNECTED) {
            removePreference(cachedDevice);
        } else if (state == BluetoothAdapter.STATE_DISCONNECTED) {
        } else if (state == BluetoothAdapter.STATE_DISCONNECTED &&  device.isTwsPlusDevice()) {
            addPreference(cachedDevice);
        }
    }