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

Commit 1bfe6e95 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug where surface crashes when the enter animation starts while...

Merge "Fix a bug where surface crashes when the enter animation starts while the exit animation has not yet finished" into ics-mr1
parents 3c5b65c9 cef37fb4
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -2578,11 +2578,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    (win.mAppToken == null || !win.mAppToken.clientHidden)) {
                displayed = !win.isVisibleLw();
                if (win.mExiting) {
                    win.mExiting = false;
                    if (win.mAnimation != null) {
                        win.mAnimation.cancel();
                        win.mAnimation = null;
                    }
                    win.cancelExitAnimationForNextAnimationLocked();
                }
                if (win.mDestroying) {
                    win.mDestroying = false;
+13 −1
Original line number Diff line number Diff line
@@ -596,6 +596,18 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        }
    }

    // TODO: Fix and call finishExit() instead of cancelExitAnimationForNextAnimationLocked()
    // for avoiding the code duplication.
    void cancelExitAnimationForNextAnimationLocked() {
        if (!mExiting) return;
        if (mAnimation != null) {
            mAnimation.cancel();
            mAnimation = null;
            destroySurfaceLocked();
        }
        mExiting = false;
    }

    Surface createSurfaceLocked() {
        if (mSurface == null) {
            mReportDestroySurface = false;