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 39b6675567e7942ae436a6404f720a53d9fb6129..88a81fc291b2d59b091c0888a88de70fa41f2073 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");