Add 144Hz display available FPS

Include 144Hz and its divisor frame rates to game mode list

Bug: 279728073
Test: atest GameManagerServiceTests
Test: atest FrameRateOverrideHostTest
Change-Id: I8e05292fc5c59252fe991df95412e3b74f366715
This commit is contained in:
Andy Yu
2023-05-02 12:34:51 -07:00
parent e6eaf926ff
commit 0794867be6

View File

@@ -402,11 +402,15 @@ public final class GameManagerService extends IGameManagerService.Stub {
public enum FrameRate {
FPS_DEFAULT(0),
FPS_30(30),
FPS_36(36),
FPS_40(40),
FPS_45(45),
FPS_48(48),
FPS_60(60),
FPS_72(72),
FPS_90(90),
FPS_120(120),
FPS_144(144),
FPS_INVALID(-1);
public final int fps;
@@ -423,16 +427,24 @@ public final class GameManagerService extends IGameManagerService.Stub {
switch (raw) {
case "30":
return FrameRate.FPS_30.fps;
case "36":
return FrameRate.FPS_36.fps;
case "40":
return FrameRate.FPS_40.fps;
case "45":
return FrameRate.FPS_45.fps;
case "48":
return FrameRate.FPS_48.fps;
case "60":
return FrameRate.FPS_60.fps;
case "72":
return FrameRate.FPS_72.fps;
case "90":
return FrameRate.FPS_90.fps;
case "120":
return FrameRate.FPS_120.fps;
case "144":
return FrameRate.FPS_144.fps;
case "disable":
case "":
return FrameRate.FPS_DEFAULT.fps;