Merge "Avoid using starting bounds of open transitions" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-06-27 08:30:32 +00:00
committed by Android (Google) Code Review

View File

@@ -141,8 +141,10 @@ public class RemoteAnimationTargetCompat {
final int mode = change.getMode();
t.reparent(leash, info.getRootLeash());
t.setPosition(leash, change.getStartAbsBounds().left - info.getRootOffset().x,
change.getStartAbsBounds().top - info.getRootOffset().y);
final Rect absBounds =
(mode == TRANSIT_OPEN) ? change.getEndAbsBounds() : change.getStartAbsBounds();
t.setPosition(leash, absBounds.left - info.getRootOffset().x,
absBounds.top - info.getRootOffset().y);
// Put all the OPEN/SHOW on top
if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {