- Convert "Smooth display" and "Force peak refresh rate" to a boolean. If they are a boolean, they can be backed up without being device-specific. - Back up "Smooth display" and add a validator - Upgrade the settings in SettingsProvider - Create a utils class - RefreshRateSettingsUtils Bug: 211737588 Test: atest DisplayModeDirectorTest Test: atest ForcePeakRefreshRatePreferenceControllerTest Test: atest PeakRefreshRatePreferenceControllerTest Test: atest SettingsBackupTest Test: atest SettingsProviderTest Change-Id: Ib2cb2dd100f06f5452083b7606109a486e795a0e
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.