- Avoid calling getListPreference() in onDialogClose() everytime. Due to exception in onDialogClose(). Move preference declaration into if condition. - Add test case for crash case. Bug: 119744621 Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=UpdatableListPreferenceDialogFragmentTest Change-Id: Ia20b8289a5863136ea74e02e32b537f6967474e8
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.