- Convert inheritance from AbstractPreferenceController to TogglePreferenceController. - Register AirplaneModePreferenceController in XML. - Decouple AirplaneModeEnabler with preference, leave the UI be controled by PreferenceController. - Add RoboTests test cases for AirplaneModePreferenceController. Fixes: 67997339 Test: RunSettingsRoboTests Change-Id: I7398943ed51345e014ee7aa774bfae1ca28632f1
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.