- Add interfaces to set/get metrics category in BasePreferenceController for descendants having a chance to get it. - Set metrics category in DashboardFragment - Automatically log metrics in onPreferenceChange of TogglePreferenceController - Add support for TwoStateButtonPreference in TogglePreferenceController to make the preference generic Bug: 137559984 Test: robotest Change-Id: Ia7e0d24a3db1991b18e0286d9894570fa71247a3
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.