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

Commit 35d328ae authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Remove WSA.mAnimLayer

Wasn't set at all. Can be safely removed without changing any
logic.

Also removes a bunch of other stuff that's not used.

Test: go/wm-smoke
Change-Id: I3fd9655817a42f5361659e9f78f651074b568075
parent 5bdccba4
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -1632,17 +1632,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        return null;
    }

    int getLowestAnimLayer() {
        for (int i = 0; i < mChildren.size(); i++) {
            final WindowState w = mChildren.get(i);
            if (w.mRemoved) {
                continue;
            }
            return w.mWinAnimator.mAnimLayer;
        }
        return Integer.MAX_VALUE;
    }

    WindowState getHighestAnimLayerWindow(WindowState currentTarget) {
        WindowState candidate = null;
        for (int i = mChildren.indexOf(currentTarget); i >= 0; i--) {
@@ -1650,8 +1639,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            if (w.mRemoved) {
                continue;
            }
            if (candidate == null || w.mWinAnimator.mAnimLayer >
                    candidate.mWinAnimator.mAnimLayer) {
            if (candidate == null) {
                candidate = w;
            }
        }
+1 −26
Original line number Diff line number Diff line
@@ -2307,21 +2307,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        mPinnedStackControllerLocked.setAdjustedForIme(imeVisible, imeHeight);
    }

    /**
     * If a window that has an animation specifying a colored background and the current wallpaper
     * is visible, then the color goes *below* the wallpaper so we don't cause the wallpaper to
     * suddenly disappear.
     */
    int getLayerForAnimationBackground(WindowStateAnimator winAnimator) {
        final WindowState visibleWallpaper = mBelowAppWindowsContainers.getWindow(
                w -> w.mIsWallpaper && w.isVisibleNow());

        if (visibleWallpaper != null) {
            return visibleWallpaper.mWinAnimator.mAnimLayer;
        }
        return winAnimator.mAnimLayer;
    }

    void prepareFreezingTaskBounds() {
        for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
            final TaskStack stack = mTaskStackContainers.getChildAt(stackNdx);
@@ -2740,23 +2725,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                if (highestTarget != null) {
                    final AppTransition appTransition = mService.mAppTransition;
                    if (DEBUG_INPUT_METHOD) Slog.v(TAG_WM, appTransition + " " + highestTarget
                            + " animating=" + highestTarget.isAnimating()
                            + " layer=" + highestTarget.mWinAnimator.mAnimLayer
                            + " new layer=" + target.mWinAnimator.mAnimLayer);
                            + " animating=" + highestTarget.isAnimating());

                    final boolean higherLayer =
                            highestTarget.mWinAnimator.mAnimLayer > target.mWinAnimator.mAnimLayer;
                    if (appTransition.isTransitionSet()) {
                        // If we are currently setting up for an animation, hold everything until we
                        // can find out what will happen.
                        setInputMethodTarget(highestTarget, true);
                        return highestTarget;
                    } else if (highestTarget.isAnimating() && higherLayer) {
                        // If the window we are currently targeting is involved with an animation,
                        // and it is on top of the next target we will be over, then hold off on
                        // moving until that is done.
                        setInputMethodTarget(highestTarget, true);
                        return highestTarget;
                    }
                }
            }
+1 −4
Original line number Diff line number Diff line
@@ -1070,11 +1070,8 @@ public class TaskStack extends WindowContainer<Task> implements
    }

    void setAnimationBackground(WindowStateAnimator winAnimator, int color) {
        int animLayer = winAnimator.mAnimLayer;
        if (mAnimationBackgroundAnimator == null
                || animLayer < mAnimationBackgroundAnimator.mAnimLayer) {
        if (mAnimationBackgroundAnimator == null) {
            mAnimationBackgroundAnimator = winAnimator;
            animLayer = mDisplayContent.getLayerForAnimationBackground(winAnimator);
            showAnimationSurface(((color >> 24) & 0xff) / 255f);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ class WallpaperWindowToken extends WindowToken {
            wallpaper.dispatchWallpaperVisibility(visible);

            if (DEBUG_LAYERS || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, "adjustWallpaper win "
                    + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer);
                    + wallpaper);
        }
    }

+0 −4
Original line number Diff line number Diff line
@@ -5569,11 +5569,7 @@ public class WindowManagerService extends IWindowManager.Stub

                if (mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS
                        && mode != UPDATE_FOCUS_WILL_PLACE_SURFACES) {
                    final int prevImeAnimLayer =
                            displayContent.mInputMethodWindow.mWinAnimator.mAnimLayer;
                    displayContent.assignWindowLayers(false /* setLayoutNeeded */);
                    imWindowChanged |= prevImeAnimLayer
                            != displayContent.mInputMethodWindow.mWinAnimator.mAnimLayer;
                }
            }

Loading