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

Commit 034ef816 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't destroy surface if there is no active animation to cancel"

parents 75dfacbb b8d704b9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4373,7 +4373,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit="
                    + mRemoveOnExit + ", mDestroying=" + mDestroying);

            mWinAnimator.cancelExitAnimationForNextAnimationLocked();
            // Cancel the existing exit animation for the next enter animation.
            if (isSelfAnimating()) {
                cancelAnimation();
                destroySurfaceUnchecked();
            }
            mAnimatingExit = false;
        }
        if (mDestroying) {
+0 −8
Original line number Diff line number Diff line
@@ -248,14 +248,6 @@ class WindowStateAnimator {
        mWallpaperControllerLocked = win.getDisplayContent().mWallpaperController;
    }

    void cancelExitAnimationForNextAnimationLocked() {
        if (DEBUG_ANIM) Slog.d(TAG,
                "cancelExitAnimationForNextAnimationLocked: " + mWin);

        mWin.cancelAnimation();
        mWin.destroySurfaceUnchecked();
    }

    void onAnimationFinished() {
        // Done animating, clean up.
        if (DEBUG_ANIM) Slog.v(