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

Commit a6b5e9cc authored by buwenjing's avatar buwenjing
Browse files

Update the surface position when changing TransitionInfo.Root



We should udapte the transition leash surface position When reparenting into the original `mInfo`

Bug: 361372985
Test: Manual test

Change-Id: I700dcd42848c1b39bb27f5afef4d08819befdbac
Signed-off-by: default avatarbuwenjing <buwenjing@xiaomi.com>
parent d2d6e53f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -780,9 +780,12 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
                                change, layer, info, t, mLeashMap);
                        appearedTargets[nextTargetIdx++] = target;
                        // reparent into the original `mInfo` since that's where we are animating.
                        final int rootIdx = TransitionUtil.rootIndexFor(change, mInfo);
                        final TransitionInfo.Root root = TransitionUtil.getRootFor(change, mInfo);
                        final boolean wasClosing = closingIdx >= 0;
                        t.reparent(target.leash, mInfo.getRoot(rootIdx).getLeash());
                        t.reparent(target.leash, root.getLeash());
                        t.setPosition(target.leash,
                                change.getStartAbsBounds().left - root.getOffset().x,
                                change.getStartAbsBounds().top - root.getOffset().y);
                        t.setLayer(target.leash, layer);
                        if (wasClosing) {
                            // App was previously visible and is closing