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

Commit 059154eb authored by Lucas Silva's avatar Lucas Silva
Browse files

Update dream complication settings to use boolean setting.

This simplifies the logic and prevents the boolean from toggling itself
when new complication types are added.

Bug: 241469874
Test: manually on device
Change-Id: I0b67f9f2ce75dcfc5e57a50f9b27e374ea9295b1
parent 20dacec6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -42,14 +42,12 @@ public class DreamComplicationPreferenceController extends TogglePreferenceContr

    @Override
    public boolean isChecked() {
        return mBackend.getEnabledComplications().containsAll(mBackend.getSupportedComplications());
        return mBackend.getComplicationsEnabled();
    }

    @Override
    public boolean setChecked(boolean isChecked) {
        for (int complication : mBackend.getSupportedComplications()) {
            mBackend.setComplicationEnabled(complication, isChecked);
        }
        mBackend.setComplicationsEnabled(isChecked);
        return true;
    }