Remove jank on DND schedule page

Only add/or remove preferences when absolutely needed.
Also fix a 'load data from backend' method that wasn't.

Fixes: 216747934
Test: ZenModeAutomaticRulesPreferenceControllerTest
Test: view schedules page
Test: add schedule
Test: remove schedule
Test: view schedule child page and return to schedules page
Change-Id: I237c2ca7ea89ee6e42354470a76712068a7f4dd7
This commit is contained in:
Julia Reynolds
2023-02-28 13:01:06 -05:00
parent 019ce4c02c
commit cb6a88b862
5 changed files with 162 additions and 161 deletions

View File

@@ -66,9 +66,7 @@ abstract public class AbstractZenModeAutomaticRulePreferenceController extends
}
protected Map.Entry<String, AutomaticZenRule>[] getRules() {
if (mRules == null) {
mRules = mBackend.getAutomaticZenRules();
}
mRules = mBackend.getAutomaticZenRules();
return mRules;
}