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

Commit 88827f7e authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix surface properties not getting applied correctly

When we switched to calling prepareSurfaces in
applySurfacesChangesTransaction, we switched from
computeShownFrameLocked to prepareSurfaceLocked, which has an
additional check of waiting for opening, which caused that a
surface size change from a layout never was applied.

The original comment on that check doesn't make sense anymore,
given that we don't animate in prepareSurfaces anymore, so we can
just go ahead and remove that check.

Test: go/wm-smoke
Test: Open voice input activity
Change-Id: I46664fd3c8f9a5c549fdb245125f05f290162ebf
Fixes: 71787613
parent 7f1e49f2
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -238,15 +238,6 @@ class WindowStateAnimator {
        return mWin.isAnimating();
    }

    /**
     * Is this window currently waiting to run an opening animation?
     */
    boolean isWaitingForOpening() {
        return mService.mAppTransition.isTransitionSet()
                && (mWin.mAppToken != null && mWin.mAppToken.isHidden())
                && mService.mOpeningApps.contains(mWin.mAppToken);
    }

    void cancelExitAnimationForNextAnimationLocked() {
        if (DEBUG_ANIM) Slog.d(TAG,
                "cancelExitAnimationForNextAnimationLocked: " + mWin);
@@ -1057,17 +1048,6 @@ class WindowStateAnimator {
            return;
        }

        // Do not change surface properties of opening apps if we are waiting for the
        // transition to be ready. transitionGoodToGo could be not ready even after all
        // opening apps are drawn. It's only waiting on isFetchingAppTransitionsSpecs()
        // to get the animation spec. (For example, go into Recents and immediately open
        // the same app again before the app's surface is destroyed or saved, the surface
        // is always ready in the whole process.) If we go ahead here, the opening app
        // will be shown with the full size before the correct animation spec arrives.
        if (isWaitingForOpening()) {
            return;
        }

        boolean displayed = false;

        computeShownFrameLocked();