summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-08-02 23:50:46 +0800
committer Riddle Hsu <riddlehsu@google.com> 2023-08-02 23:54:02 +0800
commit5df3662fb2a12ff5a8d1093dd0f1c30b7d9deff6 (patch)
tree99db101c472dd468272cd8ca21df78a80517c8ca
parent731e0d0bd71837872d3f8af8d73ede7eeff6e8cd (diff)
Only cancel recent animation for change transition including display
If the transition type is TO_FRONT, the display rotation change can perform seamlessly with the opening app. The appearance will be better than legacy transition that there was an additional rotation animation. Now it can show the app in destination orientation directly. Bug: 290553188 Test: Use quickstep to switch to an app that changes requested orientation when resuming. Change-Id: I621080fcf9fc306dc64eb3c3ba2ce35b592bd9fe
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java3
1 files changed, 2 insertions, 1 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 39b6675567e7..88a81fc291b2 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
@@ -604,7 +604,8 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
} else if (change.getMode() == TRANSIT_CHANGE) {
// Finish recents animation if the display is changed, so the default
// transition handler can play the animation such as rotation effect.
- if (change.hasFlags(TransitionInfo.FLAG_IS_DISPLAY)) {
+ if (change.hasFlags(TransitionInfo.FLAG_IS_DISPLAY)
+ && info.getType() == TRANSIT_CHANGE) {
// This call to cancel will use the screenshots taken preemptively in
// handleMidTransitionRequest() prior to the display changing
cancel(mWillFinishToHome, true /* withScreenshots */, "display change");