This patch adds a new toggle under Developer settings. It defaults to off, meaning game default frame rate is not disabled. Users can choose to togge it on to disable game default frame rate. When a user toggles this switch, it calls to GameManagerService to update the frame rate of games that are currently in the foreground and coming games. screenshots: https://screenshot.googleplex.com/8jTWyNBhJm7zC4x https://screenshot.googleplex.com/5junmXtuHnRxyL2 Bug: 286084594 Bug: 306266471 Test: m; flash Test: atest SettingsRoboTests:GameDefaultFrameRatePReferenceControllerTest Change-Id: Ide843f61e57e244d6e1fc30f93b2358b2bcb655b
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.