Merge "Preempt recents animation if display is changed" into udc-dev am: fe69fc421d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21647142

Change-Id: I2a395f14c5f5b93b05f66ddafa15c9b58bc6f287
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Riddle Hsu
2023-03-02 08:08:33 +00:00
committed by Automerger Merge Worker

View File

@@ -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;
}
}