Merge "Allow enabling ANGLE for GAME_MODE_STANDARD"

This commit is contained in:
Tim Van Patten
2021-12-15 00:37:21 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 10 deletions

View File

@@ -385,7 +385,8 @@ public final class GameManagerService extends IGameManagerService.Stub {
}
public boolean isValid() {
return mGameMode == GameManager.GAME_MODE_PERFORMANCE
return mGameMode == GameManager.GAME_MODE_STANDARD
|| mGameMode == GameManager.GAME_MODE_PERFORMANCE
|| mGameMode == GameManager.GAME_MODE_BATTERY;
}

View File

@@ -167,15 +167,9 @@ public class GameManagerShellCommand extends ShellCommand {
switch (gameMode.toLowerCase()) {
case "1":
case "standard":
// Standard should only be available if other game modes are.
if (batteryModeSupported || perfModeSupported) {
service.setGameMode(packageName, GameManager.GAME_MODE_STANDARD,
userId);
} else {
pw.println("Game mode: " + gameMode + " not supported by "
+ packageName);
return -1;
}
// Standard mode can be used to specify loading ANGLE as the default OpenGL ES
// driver, so it should always be available.
service.setGameMode(packageName, GameManager.GAME_MODE_STANDARD, userId);
break;
case "2":
case "performance":