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

Commit f09bdfc4 authored by Robert Carr's avatar Robert Carr
Browse files

WindowManager: Remove windowsAreScaleable

This code was added for an earlier implementation of the PIP animation.
In this earlier implementation PIP was animated by directly scaling the
WSA level surface. This means that if we were in SCALING_MODE_FREEZE the
requested v active geometry logic in SF could freeze our
matrix/position/crop updates. Now that we manipulate the PIP surface
via higher levels of the hierarchy this wont be a problem and we don't
need to change the scaling mode.

Bug: 161937501
Test: Existing tests pass
Change-Id: Iaf10ee4fae9a56a79c1432d9ffd4c8227b832b01
parent 4a11c440
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -851,15 +851,6 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
        return mWindowingMode == WINDOWING_MODE_FREEFORM || mWindowingMode == WINDOWING_MODE_PINNED;
    }

    /**
     * Returns true if this container may be scaled without resizing, and windows within may need
     * to be configured as such.
     * @hide
     */
    public boolean windowsAreScaleable() {
        return mWindowingMode == WINDOWING_MODE_PINNED;
    }

    /**
     * Returns true if windows in this container should be given move animations by default.
     * @hide
+0 −19
Original line number Diff line number Diff line
@@ -1474,14 +1474,6 @@ class Task extends WindowContainer<WindowContainer> {
        // Update task bounds if needed.
        adjustBoundsForDisplayChangeIfNeeded(getDisplayContent());

        if (getWindowConfiguration().windowsAreScaleable()) {
            // We force windows out of SCALING_MODE_FREEZE so that we can continue to animate them
            // while a resize is pending.
            forceWindowsScaleable(true /* force */);
        } else {
            forceWindowsScaleable(false /* force */);
        }

        mRootWindowContainer.updateUIDsPresentOnDisplay();

        // Resume next focusable stack after reparenting to another display if we aren't removing
@@ -3780,17 +3772,6 @@ class Task extends WindowContainer<WindowContainer> {
        positionChildAt(position, child, false /* includeParents */);
    }

    void forceWindowsScaleable(boolean force) {
        mWmService.openSurfaceTransaction();
        try {
            for (int i = mChildren.size() - 1; i >= 0; i--) {
                mChildren.get(i).forceWindowsScaleableInTransaction(force);
            }
        } finally {
            mWmService.closeSurfaceTransaction("forceWindowsScaleable");
        }
    }

    void setTaskDescription(TaskDescription taskDescription) {
        mTaskDescription = taskDescription;
    }
+0 −7
Original line number Diff line number Diff line
@@ -861,13 +861,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        }
    }

    void forceWindowsScaleableInTransaction(boolean force) {
        for (int i = mChildren.size() - 1; i >= 0; --i) {
            final WindowContainer wc = mChildren.get(i);
            wc.forceWindowsScaleableInTransaction(force);
        }
    }

    /**
     * @return {@code true} when an application can override an app transition animation on this
     * container.
+1 −10
Original line number Diff line number Diff line
@@ -2172,15 +2172,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
    }

    @Override
    void forceWindowsScaleableInTransaction(boolean force) {
        if (mWinAnimator != null && mWinAnimator.hasSurface()) {
            mWinAnimator.mSurfaceController.forceScaleableInTransaction(force);
        }

        super.forceWindowsScaleableInTransaction(force);
    }

  @Override
    void removeImmediately() {
        super.removeImmediately();
+0 −4
Original line number Diff line number Diff line
@@ -971,10 +971,6 @@ class WindowStateAnimator {
     * @return Returns true if the surface was successfully shown.
     */
    private boolean showSurfaceRobustlyLocked() {
        if (mWin.getWindowConfiguration().windowsAreScaleable()) {
            mSurfaceController.forceScaleableInTransaction(true);
        }

        boolean shown = mSurfaceController.showRobustlyInTransaction();
        if (!shown)
            return false;
Loading