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

Commit 2ac7514c authored by Jorge Gil's avatar Jorge Gil Committed by Android (Google) Code Review
Browse files

Merge "Hide task surface once it goes off-screen in close animation" into main

parents f41f24f5 8db50898
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -254,8 +254,13 @@ public class FreeformTaskTransitionHandler
        finishT.hide(sc);
        final Rect startBounds = new Rect(change.getStartAbsBounds());
        animator.addUpdateListener(animation -> {
            t.setPosition(sc, startBounds.left,
                    startBounds.top + (animation.getAnimatedFraction() * screenHeight));
            final float newTop = startBounds.top + (animation.getAnimatedFraction() * screenHeight);
            t.setPosition(sc, startBounds.left, newTop);
            if (newTop > screenHeight) {
                // At this point the task surface is off-screen, so hide it to prevent flicker
                // failures. See b/377651666.
                t.hide(sc);
            }
            t.apply();
        });
        animator.addListener(