summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-01-16 10:04:56 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-01-16 10:04:56 -0800
commitfecb931f35bd37cd97a59b60024b9c7d88935193 (patch)
treea77b1bb6b2da41758d30a8933dc521cd2a6d89ba
parent7d5b30c1273061f1c0400f115421364fae9e24d2 (diff)
parenta6b5e9cc674cc21221a21a731150c67cf1249848 (diff)
Merge "Update the surface position when changing TransitionInfo.Root" into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index 8077aeebf27f..8cec017e9ec9 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -1080,9 +1080,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