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

Commit 05c95081 authored by zhenchao's avatar zhenchao Committed by Bruno Martins
Browse files

Bluetooth-TWS: UI updates based on Filter matched

Change implementation of Saved Earbuds category as same as Previous Connected
Devices category for legacy devices, onProfileConnectionStateChanged in
BluetoothDeviceUpdater is used and UI updates based on Filter matched or not.

Change-Id: Iff047ccd90e81696e805fd090ada86dc0c6b2feb
CRs-Fixed: 2524220
parent 12a62a81
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -74,17 +74,6 @@ public class SavedBluetoothTwsDeviceUpdater extends BluetoothDeviceUpdater {
        super(fragment, devicePreferenceCallback, localBluetoothManager);
    }

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

    @Override
    public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
        final BluetoothDevice device = cachedDevice.getDevice();