diff options
Diffstat (limited to 'services/core/java/com/android/server/wm/WindowManagerService.java')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 7019453..6b5c224 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2734,14 +2734,16 @@ public class WindowManagerService extends IWindowManager.Stub } } final AppWindowToken appToken = win.mAppToken; + // Prevent an immediate window exit only for a real animation, ignoring e.g. + // dummy animations. + final boolean inAnimation = win.mWinAnimator.isWindowAnimatingNow(); // The starting window is the last window in this app token and it isn't animating. // Allow it to be removed now as there is no additional window or animation that will // trigger its removal. final boolean lastWinStartingNotAnimating = startingWindow && appToken!= null - && appToken.allAppWindows.size() == 1 && !win.mWinAnimator.isWindowAnimating(); - if (!lastWinStartingNotAnimating && (win.mExiting || win.mWinAnimator.isAnimating())) { + && appToken.allAppWindows.size() == 1 && !inAnimation; + if (!lastWinStartingNotAnimating && (win.mExiting || inAnimation)) { // The exit animation is running... wait for it! - //Slog.i(TAG, "*** Running exit animation..."); win.mExiting = true; win.mRemoveOnExit = true; final DisplayContent displayContent = win.getDisplayContent(); @@ -2757,7 +2759,6 @@ public class WindowManagerService extends IWindowManager.Stub if (focusChanged) { mInputMonitor.updateInputWindowsLw(false /*force*/); } - //dump(); Binder.restoreCallingIdentity(origId); return; } |