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

Commit 053f11b4 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Fix the round corner and crop issue after auto-enter-pip

When auto-enter-pip from a Task with multiple activities, the leash of
the task will be animated before the top activity being reparented to
the pinned root task, we perform the cleanup on original task in
Task#clearLastRecentsAnimationTransaction.

What's fixed in this CL
- reset also the corner radius
- reset the window crop to be null

Test cases, auto-enter-pip by navigating to test Activity in ApiDemos
- from portrait, w/ source rect hint
- from portrait, w/o source rect hint
- from landscape, w/ source rect hint
- from landscape, w/o source rect hint

after entering PiP, exit to original task > hit back again and verify
that both corner radius and window crop are fine

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/b8kkFJNjqw1Kj6yj8vfy36
Bug: 192564925
Test: manual, see description and video
Change-Id: I5363e310ec53c9ec1531e7b0aaf08ba488f55d96
parent 29bf17a2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7653,9 +7653,9 @@ class Task extends WindowContainer<WindowContainer> {
        mLastRecentsAnimationTransaction = null;
        mLastRecentsAnimationOverlay = null;
        // reset also the crop and transform introduced by mLastRecentsAnimationTransaction
        Rect bounds = getBounds();
        getPendingTransaction().setMatrix(mSurfaceControl, Matrix.IDENTITY_MATRIX, new float[9])
                .setWindowCrop(mSurfaceControl, bounds.width(), bounds.height());
                .setWindowCrop(mSurfaceControl, null)
                .setCornerRadius(mSurfaceControl, 0);
    }

    void maybeApplyLastRecentsAnimationTransaction() {