Add Settings switch to disable Game default frame rate

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
This commit is contained in:
Andy Yu
2023-12-05 16:01:46 -08:00
parent accd9ca298
commit e6e57cffbd
9 changed files with 411 additions and 1 deletions

View File

@@ -688,6 +688,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllers.add(new HardwareLayersUpdatesPreferenceController(context));
controllers.add(new DebugGpuOverdrawPreferenceController(context));
controllers.add(new DebugNonRectClipOperationsPreferenceController(context));
controllers.add(new GameDefaultFrameRatePreferenceController(context));
controllers.add(new ForceDarkPreferenceController(context));
controllers.add(new EnableBlursPreferenceController(context));
controllers.add(new ForceMSAAPreferenceController(context));