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

@@ -5,6 +5,13 @@ package: "com.android.settings.flags"
# NOTE: All Settings flags share the same Flags class, so prefix our
# flags with 'development' to prevent naming collision.
flag {
name: "development_game_default_frame_rate"
namespace: "game"
description: "This flag guards the new behavior with the addition of Game Default Frame Rate feature."
bug: "286084594"
}
flag {
name: "development_hdr_sdr_ratio"
namespace: "core_graphics"