Based on Android S design, we want to let user can toggle night light in display settings page directly. 1. Use primary switch preference in xml file. 2. Add a switch toggle controler for its preference. 3. Move logic of night display preference to controler. 4. Remove the night display preference since we migrate the logic to controller. Test: Night display works as intented behavior. Bug: 174964139 Change-Id: Id920033cb22b1a9dd42c77c6fc2563ddae96bfcd
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.