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
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.