summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-03-02 07:29:23 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-03-02 07:29:23 +0000
commitfe69fc421d60aeaeedc6ccde41e942980de5c18b (patch)
tree9cfacebf7b29111dc87918dc9986e2bee7223e57
parentc605985f51c1976ce6a4b18f55c60c2cc17701ef (diff)
parent870927314e29d7428e34b9e35c5c1a364582c2df (diff)
Merge "Preempt recents animation if display is changed" into udc-dev
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java
index 70a36ce7e904..0d19b877e43c 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java
@@ -246,6 +246,13 @@ public class RemoteTransitionCompat {
closingTasks.add(change);
}
} 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)) {
+ mListener.onSwitchToScreenshot(() -> finish(false /* toHome */,
+ false /* userLeaveHint */));
+ return false;
+ }
hasChangingApp = true;
}
}