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

Commit 650ce9ae authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Make setRecentsScreenshotEnabled public"

parents a7820de0 62df8ad0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4243,6 +4243,7 @@ package android.app {
    method @Deprecated public final void setProgressBarIndeterminate(boolean);
    method @Deprecated public final void setProgressBarIndeterminateVisibility(boolean);
    method @Deprecated public final void setProgressBarVisibility(boolean);
    method public void setRecentsScreenshotEnabled(boolean);
    method public void setRequestedOrientation(int);
    method public final void setResult(int);
    method public final void setResult(int, android.content.Intent);
+1 −0
Original line number Diff line number Diff line
@@ -2862,6 +2862,7 @@ package android.view {
    method public default void setShouldShowSystemDecors(int, boolean);
    method public default void setShouldShowWithInsecureKeyguard(int, boolean);
    method public default boolean shouldShowSystemDecors(int);
    method @Nullable public default android.graphics.Bitmap snapshotTaskForRecents(@IntRange(from=0) int);
    field public static final int DISPLAY_IME_POLICY_FALLBACK_DISPLAY = 1; // 0x1
    field public static final int DISPLAY_IME_POLICY_HIDE = 2; // 0x2
    field public static final int DISPLAY_IME_POLICY_LOCAL = 0; // 0x0
+15 −7
Original line number Diff line number Diff line
@@ -8662,8 +8662,18 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * If set to true, this indicates to the system that it should never take a
     * screenshot of the activity to be used as a representation while it is not in a started state.
     * @hide
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.S,
            publicAlternatives = "Use {@link #setRecentsScreenshotEnabled(boolean)} instead.")
    public void setDisablePreviewScreenshots(boolean disable) {
        setRecentsScreenshotEnabled(!disable);
    }

    /**
     * If set to false, this indicates to the system that it should never take a
     * screenshot of the activity to be used as a representation in recents screen. By default, this
     * value is {@code true}.
     * <p>
     * Note that the system may use the window background of the theme instead to represent
     * the window when it is not running.
@@ -8676,12 +8686,10 @@ public class Activity extends ContextThemeWrapper
     * {@link android.service.voice.VoiceInteractionService} requests a screenshot via
     * {@link android.service.voice.VoiceInteractionSession#SHOW_WITH_SCREENSHOT}.
     *
     * @param disable {@code true} to disable preview screenshots; {@code false} otherwise.
     * @hide
     * @param enabled {@code true} to enable recents screenshots; {@code false} otherwise.
     */
    @UnsupportedAppUsage
    public void setDisablePreviewScreenshots(boolean disable) {
        ActivityClient.getInstance().setDisablePreviewScreenshots(mToken, disable);
    public void setRecentsScreenshotEnabled(boolean enabled) {
        ActivityClient.getInstance().setRecentsScreenshotEnabled(mToken, enabled);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -438,9 +438,9 @@ public class ActivityClient {
        }
    }

    void setDisablePreviewScreenshots(IBinder token, boolean disable) {
    void setRecentsScreenshotEnabled(IBinder token, boolean enabled) {
        try {
            getActivityClientController().setDisablePreviewScreenshots(token, disable);
            getActivityClientController().setRecentsScreenshotEnabled(token, enabled);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ interface IActivityClientController {
            int enterAnim, int exitAnim, int backgroundColor);
    int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);

    /** See {@link android.app.Activity#setDisablePreviewScreenshots}. */
    oneway void setDisablePreviewScreenshots(in IBinder token, boolean disable);
    /** See {@link android.app.Activity#setRecentsScreenshotEnabled}. */
    oneway void setRecentsScreenshotEnabled(in IBinder token, boolean enabled);

    /**
     * It should only be called from home activity to remove its outdated snapshot. The home
Loading