In settings we weren't properly taking into account battery saver enabled dark theme. This CL makes it so that when battery saver on we disable the toggle until battery saver is off since you can't change dark theme in battery saver. Additionally it adds a message indicating why the toggle was disabled so the user doesn't get confused. Test: robotests Bug: 131913864 Change-Id: I855e429a666098c837650852d1e1355477afa13d
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.