diff options
| author | 2023-05-31 21:42:25 +0800 | |
|---|---|---|
| committer | 2023-06-01 15:09:24 +0800 | |
| commit | 8efc7aea52b46bf01f4aff43d930044e7e59bf39 (patch) | |
| tree | b8d1a50d02ca1afb10bb0a4751ede7bd69bd3e91 | |
| parent | 3816d9b959b0d0dddbc4b536328534fb350aeac4 (diff) | |
Put the change to top if it has FLAG_MOVED_TO_TOP
This CL also refines the debug strings of TRANSIT_TO_FRONT and
TRANSIT_TO_BACK to make the naming rule consistent.
Fix: 283076194
Test: Swipe to home from a landscape app and quickly open it again. See
if the home screen is on top of the app during the transition.
Change-Id: Ic8dba8c19e2447d8192898642d8499dec2a344c3
| -rw-r--r-- | core/java/android/window/TransitionInfo.java | 4 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/window/TransitionInfo.java b/core/java/android/window/TransitionInfo.java index 8c05130bf5fe..a92ca8a4d3f2 100644 --- a/core/java/android/window/TransitionInfo.java +++ b/core/java/android/window/TransitionInfo.java @@ -424,8 +424,8 @@ public final class TransitionInfo implements Parcelable { case TRANSIT_NONE: return "NONE"; case TRANSIT_OPEN: return "OPEN"; case TRANSIT_CLOSE: return "CLOSE"; - case TRANSIT_TO_FRONT: return "SHOW"; - case TRANSIT_TO_BACK: return "HIDE"; + case TRANSIT_TO_FRONT: return "TO_FRONT"; + case TRANSIT_TO_BACK: return "TO_BACK"; case TRANSIT_CHANGE: return "CHANGE"; default: return "<unknown:" + mode + ">"; } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java index ce8d792ef302..de20c2d90066 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java @@ -29,6 +29,7 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.fixScale; import static android.window.TransitionInfo.FLAG_IS_OCCLUDED; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; +import static android.window.TransitionInfo.FLAG_MOVED_TO_TOP; import static android.window.TransitionInfo.FLAG_NO_ANIMATION; import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT; @@ -554,7 +555,10 @@ public class Transitions implements RemoteCallable<Transitions>, layer = -zSplitLine - i; } } else if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) { - if (isOpening) { + if (isOpening + // This is for when an activity launches while a different transition is + // collecting. + || change.hasFlags(FLAG_MOVED_TO_TOP)) { // put on top layer = zSplitLine + numChanges - i; } else { |