Preferences shouldn't be initialized at onAttach() because the settings style hasn't been loaded yet. This change defers the preferences initialization so that they comply with the settings style. Test: manually Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.display Bug: 183909540 Change-Id: I4dc4503924a1dcd5b8d41f7d27e576befb11f976
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.