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

Commit 52767e85 authored by Craig Mautner's avatar Craig Mautner Committed by The Android Automerger
Browse files

Defer the Surface.show until animation phase.

This fixes a rotation bug introduced by delaying rendering animation
into the Surface. Now instead of delaying the rendering we delay the
show by eliminating a point where we were showing the Surface too soon.

Change-Id: I63ad3b494963111ffc96569093c8d43517c5408b
parent 9378c3fb
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -978,7 +978,7 @@ class WindowStateAnimator {

        setSurfaceBoundaries(recoveringMemory);

        if (w.mAttachedHidden || !w.isReadyForDisplay() || !w.isDrawnLw()) {
        if (w.mAttachedHidden || !w.isReadyForDisplay()) {
            if (!mLastHidden) {
                //dump();
                mLastHidden = true;
@@ -1136,17 +1136,15 @@ class WindowStateAnimator {
                    + " animating=" + mAnimating
                    + " tok animating="
                    + (mWin.mAppToken != null ? mWin.mAppToken.mAppAnimator.animating : false));
            if (!showSurfaceRobustlyLocked()) {
                return false;
            }

            mService.enableScreenIfNeededLocked();

            applyEnterAnimationLocked();

            // Force the show in the next prepareSurfaceLocked() call.
            mLastAlpha = -1;
            mLastHidden = false;
            mDrawState = HAS_DRAWN;
            mService.scheduleAnimationLocked();

            int i = mWin.mChildWindows.size();
            while (i > 0) {