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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user