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

Commit 4e421c39 authored by Adam Bodnar's avatar Adam Bodnar
Browse files

Integrate DeviceConfig with GameManagerService

Bug: 180439000

Test: adb shell device_config put game_overlay <PACKAGE NAME> <VALUES>

Change-Id: If201b36e6f223e42dbefba52bbf86c9d760d3d26
parent 8f02ccf5
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -135,4 +135,20 @@ public final class GameManager {
            throw e.rethrowFromSystemServer();
        }
    }
    /**
     * Returns a list of supported game modes for a given package.
     * <p>
     * The caller must have {@link android.Manifest.permission#MANAGE_GAME_MODE}.
     *
     * @hide
     */
    @RequiresPermission(Manifest.permission.MANAGE_GAME_MODE)
    public @GameMode int[] getAvailableGameModes(@NonNull String packageName) {
        try {
            return mService.getAvailableGameModes(packageName);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

}
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@ package android.app;
interface IGameManagerService {
    int getGameMode(String packageName, int userId);
    void setGameMode(String packageName, int gameMode, int userId);
    int[] getAvailableGameModes(String packageName);
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -5552,6 +5552,7 @@
         @hide  <p>Not for use by third-party applications.</p> -->
    <permission android:name="android.permission.OVERRIDE_COMPAT_CHANGE_CONFIG"
                android:protectionLevel="signature|privileged" />
    <uses-permission android:name="android.permission.OVERRIDE_COMPAT_CHANGE_CONFIG"/>

    <!-- Allows input events to be monitored. Very dangerous!  @hide -->
    <permission android:name="android.permission.MONITOR_INPUT"
+418 −6

File changed.

Preview size limit exceeded, changes collapsed.