Root Cause: ToggleFeaturePrefreferenceFragment becomes heavy when more and more features come in. Solution: Mirgrate to DashboardFragment, a plugin-style preference controllers, can help us separate the preference and its logic into its own controller. * This is the first step for the whole migration. Change to extend DashboardFragment and fill up the missing override functions. * Reorder fields and functions to the recommended general approach. Bug: 171272809 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility Change-Id: I852091700a4b3b3c7bbdbc82f0b5dc47c087d61c
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.