Loading core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11410,7 +11410,7 @@ package android.service.games { method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public final boolean restartGame(); method public void setTaskOverlayView(@NonNull android.view.View, @NonNull android.view.ViewGroup.LayoutParams); method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public final void startActivityFromGameSessionForResult(@NonNull android.content.Intent, @Nullable android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSessionActivityCallback); method public void takeScreenshot(@NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSession.ScreenshotCallback); method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(@NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSession.ScreenshotCallback); } public static interface GameSession.ScreenshotCallback { core/java/android/service/games/GameSession.java +1 −0 Original line number Diff line number Diff line Loading @@ -426,6 +426,7 @@ public abstract class GameSession { * or failed. * @throws IllegalStateException if this method is called prior to {@link #onCreate}. */ @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(@NonNull Executor executor, @NonNull ScreenshotCallback callback) { if (mGameSessionController == null) { throw new IllegalStateException("Can not call before onCreate()"); Loading services/core/java/com/android/server/app/GameServiceProviderInstanceImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -192,8 +192,11 @@ final class GameServiceProviderInstanceImpl implements GameServiceProviderInstan private final IGameSessionController mGameSessionController = new IGameSessionController.Stub() { @Override @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(int taskId, @NonNull AndroidFuture gameScreenshotResultFuture) { mContext.enforceCallingPermission(Manifest.permission.MANAGE_GAME_ACTIVITY, "takeScreenshot()"); mBackgroundExecutor.execute(() -> { GameServiceProviderInstanceImpl.this.takeScreenshot(taskId, gameScreenshotResultFuture); Loading Loading
core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11410,7 +11410,7 @@ package android.service.games { method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public final boolean restartGame(); method public void setTaskOverlayView(@NonNull android.view.View, @NonNull android.view.ViewGroup.LayoutParams); method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public final void startActivityFromGameSessionForResult(@NonNull android.content.Intent, @Nullable android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSessionActivityCallback); method public void takeScreenshot(@NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSession.ScreenshotCallback); method @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(@NonNull java.util.concurrent.Executor, @NonNull android.service.games.GameSession.ScreenshotCallback); } public static interface GameSession.ScreenshotCallback {
core/java/android/service/games/GameSession.java +1 −0 Original line number Diff line number Diff line Loading @@ -426,6 +426,7 @@ public abstract class GameSession { * or failed. * @throws IllegalStateException if this method is called prior to {@link #onCreate}. */ @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(@NonNull Executor executor, @NonNull ScreenshotCallback callback) { if (mGameSessionController == null) { throw new IllegalStateException("Can not call before onCreate()"); Loading
services/core/java/com/android/server/app/GameServiceProviderInstanceImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -192,8 +192,11 @@ final class GameServiceProviderInstanceImpl implements GameServiceProviderInstan private final IGameSessionController mGameSessionController = new IGameSessionController.Stub() { @Override @RequiresPermission(android.Manifest.permission.MANAGE_GAME_ACTIVITY) public void takeScreenshot(int taskId, @NonNull AndroidFuture gameScreenshotResultFuture) { mContext.enforceCallingPermission(Manifest.permission.MANAGE_GAME_ACTIVITY, "takeScreenshot()"); mBackgroundExecutor.execute(() -> { GameServiceProviderInstanceImpl.this.takeScreenshot(taskId, gameScreenshotResultFuture); Loading