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

Commit 4c7dcca3 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Skip window exit animation if display has transition" into tm-dev am:...

Merge "Skip window exit animation if display has transition" into tm-dev am: 61f01fe5 am: 1bc88e10

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17526303



Change-Id: Ib427d0aacfac620044fdfd22aacc95232c57370e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 032059cc 1bc88e10
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -2606,11 +2606,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                    return;
                    return;
                }
                }


                // Remove immediately if there is display transition because the animation is
                // usually unnoticeable (e.g. covered by rotation animation) and the animation
                // bounds could be inconsistent, such as depending on when the window applies
                // its draw transaction with new rotation.
                final boolean allowExitAnimation = !getDisplayContent().inTransition();

                if (wasVisible) {
                if (wasVisible) {
                    final int transit = (!startingWindow) ? TRANSIT_EXIT : TRANSIT_PREVIEW_DONE;
                    final int transit = (!startingWindow) ? TRANSIT_EXIT : TRANSIT_PREVIEW_DONE;


                    // Try starting an animation.
                    // Try starting an animation.
                    if (mWinAnimator.applyAnimationLocked(transit, false)) {
                    if (allowExitAnimation && mWinAnimator.applyAnimationLocked(transit, false)) {
                        ProtoLog.v(WM_DEBUG_ANIM,
                        ProtoLog.v(WM_DEBUG_ANIM,
                                "Set animatingExit: reason=remove/applyAnimation win=%s", this);
                                "Set animatingExit: reason=remove/applyAnimation win=%s", this);
                        mAnimatingExit = true;
                        mAnimatingExit = true;
@@ -2624,7 +2630,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                        mWmService.mAccessibilityController.onWindowTransition(this, transit);
                        mWmService.mAccessibilityController.onWindowTransition(this, transit);
                    }
                    }
                }
                }
                final boolean isAnimating = mAnimatingExit || isExitAnimationRunningSelfOrParent();
                final boolean isAnimating = allowExitAnimation
                        && (mAnimatingExit || isExitAnimationRunningSelfOrParent());
                final boolean lastWindowIsStartingWindow = startingWindow && mActivityRecord != null
                final boolean lastWindowIsStartingWindow = startingWindow && mActivityRecord != null
                        && mActivityRecord.isLastWindow(this);
                        && mActivityRecord.isLastWindow(this);
                // We delay the removal of a window if it has a showing surface that can be used to run
                // We delay the removal of a window if it has a showing surface that can be used to run
@@ -5284,12 +5291,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (mControllableInsetProvider != null) {
        if (mControllableInsetProvider != null) {
            return;
            return;
        }
        }
        if (getDisplayContent().inTransition()) {
            // Skip because the animation is usually unnoticeable (e.g. covered by rotation
            // animation) and the animation bounds could be inconsistent, such as depending
            // on when the window applies its draw transaction with new rotation.
            return;
        }


        final DisplayInfo displayInfo = getDisplayInfo();
        final DisplayInfo displayInfo = getDisplayInfo();
        anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
        anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),