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

Commit 5488d2d1 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Fallback to endRelOffset for activity surface offsets" into 24D1-dev

parents c854cb28 c4afa247
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -507,6 +507,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
                final Point animRelOffset = new Point(
                        change.getEndAbsBounds().left - animRoot.getOffset().x,
                        change.getEndAbsBounds().top - animRoot.getOffset().y);

                if (change.getActivityComponent() != null) {
                    // For appcompat letterbox: we intentionally report the task-bounds so that we
                    // can animate as-if letterboxes are "part of" the activity. This means we can't
                    // always rely solely on endAbsBounds and need to also max with endRelOffset.
                    animRelOffset.x = Math.max(animRelOffset.x, change.getEndRelOffset().x);
                    animRelOffset.y = Math.max(animRelOffset.y, change.getEndRelOffset().y);
                }

                if (change.getActivityComponent() != null && !isActivityLevel) {
                    // At this point, this is an independent activity change in a non-activity
                    // transition. This means that an activity transition got erroneously combined