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

Commit 552071b5 authored by Kevin's avatar Kevin
Browse files

Boost correct layer for Recents Go transition

For transition from app to fallback recents, the apps were on the same
Z-layer causing both to show up in the animation. We should instead
boost the closing app so that it's visually on top as it shrinks down.

Bug: 114136250
Test: Press overview in app to go to recents, behaves as expected
Change-Id: Iaca1e4fc1486721468a5bfffb1d139259d48739f
parent 7f5083b7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -173,8 +173,10 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple

        // Keep recents visible throughout the animation.
        SurfaceParams[] params = new SurfaceParams[2];
        // Closing app should stay on top.
        int boostedMode = MODE_CLOSING;
        params[0] = new SurfaceParams(recentsTarget.leash, 1f, null /* matrix */,
                null /* windowCrop */, getLayer(recentsTarget, MODE_OPENING), 0 /* cornerRadius */);
                null /* windowCrop */, getLayer(recentsTarget, boostedMode), 0 /* cornerRadius */);

        valueAnimator.addUpdateListener(new MultiValueUpdateListener() {
            private final FloatProp mScaleX;
@@ -214,7 +216,7 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
                m.postTranslate(mTranslationX.value, mTranslationY.value);

                params[1] = new SurfaceParams(appTarget.leash, mAlpha.value, m,
                        null /* windowCrop */, getLayer(appTarget, MODE_CLOSING),
                        null /* windowCrop */, getLayer(appTarget, boostedMode),
                        0 /* cornerRadius */);
                surfaceApplier.scheduleApply(params);
            }