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

Commit e70cbd34 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5752705 from b95eefcc to qt-qpr1-release

Change-Id: I49c17a8ec9c63ad22b0407065a5d328ec07aaff3
parents d09b7370 b95eefcc
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -5437,10 +5437,11 @@ public class Notification implements Parcelable
        /**
         * Construct a RemoteViews for the display in public contexts like on the lockscreen.
         *
         * @param isLowPriority is this notification low priority
         * @hide
         */
        @UnsupportedAppUsage
        public RemoteViews makePublicContentView() {
        public RemoteViews makePublicContentView(boolean isLowPriority) {
            if (mN.publicVersion != null) {
                final Builder builder = recoverBuilder(mContext, mN.publicVersion);
                return builder.createContentView();
@@ -5467,7 +5468,11 @@ public class Notification implements Parcelable
            }
            mN.extras = publicExtras;
            RemoteViews view;
            view = makeNotificationHeader();
            StandardTemplateParams params = mParams.reset().fillTextsFrom(this);
            if (isLowPriority) {
                params.forceDefaultColor();
            }
            view = makeNotificationHeader(params);
            view.setBoolean(R.id.notification_header, "setExpandOnlyOnButton", true);
            mN.extras = savedBundle;
            mN.mLargeIcon = largeIcon;
+30 −14
Original line number Diff line number Diff line
@@ -76,6 +76,21 @@ interface IRecentsAnimationController {
     */
    void hideCurrentInputMethod();

    /**
     * This call is deprecated, use #setDeferCancelUntilNextTransition() instead
     * TODO(138144750): Remove this method once there are no callers
     * @deprecated
     */
    void setCancelWithDeferredScreenshot(boolean screenshot);

    /**
     * Clean up the screenshot of previous task which was created during recents animation that
     * was cancelled by a stack order change.
     *
     * @see {@link IRecentsAnimationRunner#onAnimationCanceled}
     */
    void cleanupScreenshot();

    /**
     * Set a state for controller whether would like to cancel recents animations with deferred
     * task screenshot presentation.
@@ -86,22 +101,23 @@ interface IRecentsAnimationController {
     * screenshot, so that Launcher can still control the leash lifecycle & make the next app
     * transition animate smoothly without flickering.
     *
     * @param screenshot When set {@code true}, means recents animation will be canceled when the
     *                   next app launch. System will take previous task's screenshot when the next
     *                   app transition starting, and skip previous task's animation.
     *                   Set {@code false} means will not take screenshot & skip animation
     *                   for previous task.
     * @param defer When set {@code true}, means that the recents animation will defer canceling the
     *              animation when a stack order change is triggered until the subsequent app
     *              transition start and skip previous task's animation.
     *              When set to {@code false}, means that the recents animation will be canceled
     *              immediately when the stack order changes.
     * @param screenshot When set {@code true}, means that the system will take previous task's
     *                   screenshot and replace the contents of the leash with it when the next app
     *                   transition starting. The runner must call #cleanupScreenshot() to end the
     *                   recents animation.
     *                   When set to {@code false}, means that the system will simply wait for the
     *                   next app transition start to immediately cancel the recents animation. This
     *                   can be useful when you want an immediate transition into a state where the
     *                   task is shown in the home/recents activity (without waiting for a
     *                   screenshot).
     *
     * @see #cleanupScreenshot()
     * @see IRecentsAnimationRunner#onCancelled
     */
    void setCancelWithDeferredScreenshot(boolean screenshot);

    /**
     * Clean up the screenshot of previous task which was created during recents animation that
     * was cancelled by a stack order change.
     *
     * @see {@link IRecentsAnimationRunner#onAnimationCanceled}
     */
    void cleanupScreenshot();
    void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot);
}
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ oneway interface IRecentsAnimationRunner {
     * @param deferredWithScreenshot If set to {@code true}, the contents of the task will be
     *                               replaced with a screenshot, such that the runner's leash is
     *                               still active. As soon as the runner doesn't need the leash
     *                               anymore, it can call
     *                               anymore, it must call
     *                               {@link IRecentsAnimationController#cleanupScreenshot).
     *
     * @see {@link RecentsAnimationController#cleanupScreenshot}
+8 −3
Original line number Diff line number Diff line
@@ -80,6 +80,8 @@ public class QuickStepContract {
    public static final int SYSUI_STATE_HOME_DISABLED = 1 << 8;
    // The keyguard is showing, but occluded
    public static final int SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED = 1 << 9;
    // The search feature is disabled (either by SUW/SysUI/device policy)
    public static final int SYSUI_STATE_SEARCH_DISABLED = 1 << 10;

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({SYSUI_STATE_SCREEN_PINNING,
@@ -91,7 +93,8 @@ public class QuickStepContract {
            SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING,
            SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED,
            SYSUI_STATE_OVERVIEW_DISABLED,
            SYSUI_STATE_HOME_DISABLED
            SYSUI_STATE_HOME_DISABLED,
            SYSUI_STATE_SEARCH_DISABLED
    })
    public @interface SystemUiStateFlags {}

@@ -100,6 +103,7 @@ public class QuickStepContract {
        str.add((flags & SYSUI_STATE_SCREEN_PINNING) != 0 ? "screen_pinned" : "");
        str.add((flags & SYSUI_STATE_OVERVIEW_DISABLED) != 0 ? "overview_disabled" : "");
        str.add((flags & SYSUI_STATE_HOME_DISABLED) != 0 ? "home_disabled" : "");
        str.add((flags & SYSUI_STATE_SEARCH_DISABLED) != 0 ? "search_disabled" : "");
        str.add((flags & SYSUI_STATE_NAV_BAR_HIDDEN) != 0 ? "navbar_hidden" : "");
        str.add((flags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0 ? "notif_visible" : "");
        str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING) != 0 ? "keygrd_visible" : "");
@@ -150,10 +154,11 @@ public class QuickStepContract {
     * disabled.
     */
    public static boolean isAssistantGestureDisabled(int sysuiStateFlags) {
        // Disable when in screen pinning, immersive, the bouncer is showing
        // Disable when in screen pinning, immersive, the bouncer is showing, or search is disabled
        int disableFlags = SYSUI_STATE_SCREEN_PINNING
                | SYSUI_STATE_NAV_BAR_HIDDEN
                | SYSUI_STATE_BOUNCER_SHOWING;
                | SYSUI_STATE_BOUNCER_SHOWING
                | SYSUI_STATE_SEARCH_DISABLED;
        if ((sysuiStateFlags & disableFlags) != 0) {
            return true;
        }
+9 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ public class RecentsAnimationControllerCompat {
        }
    }

    @Deprecated
    public void setCancelWithDeferredScreenshot(boolean screenshot) {
        try {
            mAnimationController.setCancelWithDeferredScreenshot(screenshot);
@@ -99,6 +100,14 @@ public class RecentsAnimationControllerCompat {
        }
    }

    public void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot) {
        try {
            mAnimationController.setDeferCancelUntilNextTransition(defer, screenshot);
        } catch (RemoteException e) {
            Log.e(TAG, "Failed to set deferred cancel with screenshot", e);
        }
    }

    public void cleanupScreenshot() {
        try {
            mAnimationController.cleanupScreenshot();
Loading