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

Commit ad5725d7 authored by Craig Mautner's avatar Craig Mautner
Browse files

Eliminate wallpaper exposure during transition.

Make sure that the wallpaper target exists and is visible before
exposing the wallpaper.

Fixes bug 6570335.

Change-Id: I1dddfe26683e84fd813e7bee884ba2bd4bb85272
parent ab886f58
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -489,7 +489,11 @@ public class WindowAnimator {

            final int N = mWinAnimators.size();
            for (int i = 0; i < N; i++) {
                mWinAnimators.get(i).prepareSurfaceLocked(true);
                final WindowStateAnimator winAnimator = mWinAnimators.get(i);
                if (winAnimator.mWin.mIsWallpaper && mService.mWallpaperTarget == null) {
                    continue;
                }
                winAnimator.prepareSurfaceLocked(true);
            }

            if (mDimParams != null) {
+1 −1
Original line number Diff line number Diff line
@@ -8553,7 +8553,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    handleNotObscuredLocked(w, currentTime, innerDw, innerDh);
                }

                if (obscuredChanged && mWallpaperTarget == w) {
                if (obscuredChanged && (mWallpaperTarget == w) && w.isVisibleLw()) {
                    // This is the wallpaper target and its obscured state
                    // changed... make sure the current wallaper's visibility
                    // has been updated accordingly.
+3 −2
Original line number Diff line number Diff line
@@ -381,6 +381,7 @@ class WindowStateAnimator {
        }
        if (mService.mWallpaperTarget == mWin && mService.mLowerWallpaperTarget == null) {
            mAnimator.hideWallpapersLocked();
            mAnimator.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
        }
    }

@@ -1105,8 +1106,8 @@ class WindowStateAnimator {
                try {
                    mSurfaceAlpha = mShownAlpha;
                    mSurface.setAlpha(mShownAlpha);
                    mSurfaceLayer = w.mWinAnimator.mAnimLayer;
                    mSurface.setLayer(w.mWinAnimator.mAnimLayer);
                    mSurfaceLayer = mAnimLayer;
                    mSurface.setLayer(mAnimLayer);
                    mSurface.setMatrix(
                        mDsDx*w.mHScale, mDtDx*w.mVScale,
                        mDsDy*w.mHScale, mDtDy*w.mVScale);