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

Commit 5c80c41e authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Final fixes for growing recents transition

- Make sure to reposition windows during animations to avoid that
they lag one frame behind.
- Don't put windows that are gone for layout into resizing mode.
- Don't layout windows that are gone for layout, to avoid resizing
the surface but the client won't draw anymore.

Change-Id: I809feffef00f9a086b44504126e03f509eb7f190
Fixes: 27855229
parent c1499639
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ public class AppWindowAnimator {
            WindowStateAnimator winAnimator = mAllAppWinAnimators.get(i);
            if (DEBUG_VISIBILITY) Slog.v(TAG, "performing show on: " + winAnimator);
            winAnimator.performShowLocked();
            isAnimating |= winAnimator.isAnimating();
            isAnimating |= winAnimator.isAnimationSet();
        }
        return isAnimating;
    }
+4 −4
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ class AppWindowToken extends WindowToken {
            if (DEBUG_VISIBILITY) {
                Slog.v(TAG, "Win " + win + ": isDrawn="
                        + win.isDrawnLw()
                        + ", isAnimating=" + win.mWinAnimator.isAnimating());
                        + ", isAnimationSet=" + win.mWinAnimator.isAnimationSet());
                if (!win.isDrawnLw()) {
                    Slog.v(TAG, "Not displayed: s=" +
                            win.mWinAnimator.mSurfaceController
@@ -220,11 +220,11 @@ class AppWindowToken extends WindowToken {
            numInteresting++;
            if (win.isDrawnLw()) {
                numDrawn++;
                if (!win.mWinAnimator.isAnimating()) {
                if (!win.mWinAnimator.isAnimationSet()) {
                    numVisible++;
                }
                nowGone = false;
            } else if (win.mWinAnimator.isAnimating()) {
            } else if (win.mWinAnimator.isAnimationSet()) {
                nowGone = false;
            }
        }
@@ -297,7 +297,7 @@ class AppWindowToken extends WindowToken {
            // Return true so that the alpha doesn't get cleared.
            if (!win.mAppFreezing
                    && (win.mViewVisibility == View.VISIBLE || mAnimatingWithSavedSurface
                            || (win.mWinAnimator.isAnimating()
                            || (win.mWinAnimator.isAnimationSet()
                                    && !service.mAppTransition.isTransitionSet()))
                    && !win.mDestroying
                    && win.isDrawnLw()) {
+1 −1
Original line number Diff line number Diff line
@@ -601,7 +601,7 @@ class Task implements DimLayer.DimLayerUser {
                    // Anyway we don't need to synchronize position and content updates for these
                    // windows since they aren't at the base layer and could be moved around anyway.
                    if (!win.computeDragResizing() && win.mAttrs.type == TYPE_BASE_APPLICATION &&
                            !mStack.getBoundsAnimating()) {
                            !mStack.getBoundsAnimating() && !win.isGoneForLayoutLw()) {
                        win.mResizedWhileNotDragResizing = true;
                    }
                }
+1 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ import android.util.Slog;
import android.util.SparseArray;
import android.view.DisplayInfo;
import android.view.Surface;
import android.view.animation.PathInterpolator;
import android.view.SurfaceControl;

import com.android.internal.policy.DividerSnapAlgorithm;
@@ -503,7 +502,7 @@ public class TaskStack implements DimLayer.DimLayerUser,
                final ArrayList<WindowState> windows = activities.get(activityNdx).allAppWindows;
                for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
                    final WindowStateAnimator winAnimator = windows.get(winNdx).mWinAnimator;
                    if (winAnimator.isAnimating() || winAnimator.mWin.mAnimatingExit) {
                    if (winAnimator.isAnimationSet() || winAnimator.mWin.mAnimatingExit) {
                        return true;
                    }
                }
+2 −2
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ class WallpaperController {
    }

    boolean isWallpaperTargetAnimating() {
        return mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating()
        return mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimationSet()
                && !mWallpaperTarget.mWinAnimator.isDummyAnimation();
    }

@@ -516,7 +516,7 @@ class WallpaperController {
            if (hasWallpaper && w.isOnScreen() && (mWallpaperTarget == w || w.isDrawFinishedLw())) {
                if (DEBUG_WALLPAPER) Slog.v(TAG, "Found wallpaper target: #" + i + "=" + w);
                result.setWallpaperTarget(w, i);
                if (w == mWallpaperTarget && w.mWinAnimator.isAnimating()) {
                if (w == mWallpaperTarget && w.mWinAnimator.isAnimationSet()) {
                    // The current wallpaper target is animating, so we'll look behind it for
                    // another possible target and figure out what is going on later.
                    if (DEBUG_WALLPAPER) Slog.v(TAG,
Loading