Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f81dca4b authored by Tim Van Patten's avatar Tim Van Patten Committed by Android (Google) Code Review
Browse files

Merge "Fix failing GameManagerServiceTests"

parents 43784e95 f13fe0cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ public class GameManagerServiceTests {
    }

    private void mockDeviceConfigInvalid() {
        String configString = "mode=2,downscaleFactor=0.55";
        String configString = "";
        when(DeviceConfig.getProperty(anyString(), anyString()))
                .thenReturn(configString);
    }
@@ -373,11 +373,12 @@ public class GameManagerServiceTests {
     */
    @Test
    public void testSetGameModePermissionDenied() {
        mockModifyGameModeGranted();
        mockDeviceConfigAll();
        GameManagerService gameManagerService = new GameManagerService(mMockContext);
        gameManagerService.onUserStarting(USER_ID_1);

        // Update the game mode so we can read back something valid.
        mockModifyGameModeGranted();
        gameManagerService.setGameMode(mPackageName, GameManager.GAME_MODE_STANDARD, USER_ID_1);
        assertEquals(GameManager.GAME_MODE_STANDARD,
                gameManagerService.getGameMode(mPackageName, USER_ID_1));