summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Sheng Shih <wilsonshih@google.com> 2024-08-19 04:16:30 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-08-19 04:16:30 +0000
commite66223380bcdb76519474646ca8a8f0ff733d9c0 (patch)
tree6c61739725ff19e14afb8c3b43d788642af923f5
parent310588ddf8e4aec4128e3e9616d2766cec53a6c3 (diff)
parentc84579ea8910b347faf5804189ba99ba7b4079c4 (diff)
Merge "[PB] Fix typo when migrate PB to shell transition." into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
index 356ecb3358db..d7da0515f228 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
@@ -1313,15 +1313,18 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
info.getChanges().remove(j);
}
}
- tmpSize = info.getChanges().size();
- for (int i = 0; i < tmpSize; ++i) {
- final TransitionInfo.Change change = init.getChanges().get(i);
- if (moveToTop) {
- if (isSameChangeTarget(openComponent, openTaskId, change)) {
- change.setFlags(change.getFlags() | FLAG_MOVED_TO_TOP);
+ // Ignore merge if there is no close target
+ if (!info.getChanges().isEmpty()) {
+ tmpSize = init.getChanges().size();
+ for (int i = 0; i < tmpSize; ++i) {
+ final TransitionInfo.Change change = init.getChanges().get(i);
+ if (moveToTop) {
+ if (isSameChangeTarget(openComponent, openTaskId, change)) {
+ change.setFlags(change.getFlags() | FLAG_MOVED_TO_TOP);
+ }
}
+ info.getChanges().add(i, change);
}
- info.getChanges().add(i, change);
}
} else {
// Open transition, the transition info should be: