It's possible that in the future the peak refresh rate setting will have multiple values (e.g. 90, 120). For that reason, we shouldn't convert it to a boolean like in the previous CLs (ag/24604787, ag/24604847). - set peak/min refresh rate to infinity if it's the highest refresh rate so that when we restore the setting on another device, we also choose the highest refresh rate - back up peak/min refresh rate and add validators - upgrade 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 Test: atest RefreshRateSettingsUtilsTest Change-Id: Ie1d8cfc76e42c7d98c4a36743463ccaf3ca5d483
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.