From 81481fc20145fdb9e4985ee106af6cb9971cde0e Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Tue, 18 Mar 2014 14:26:36 -0700 Subject: Defer removal of activity until animation complete. Do not remove an AppWindowToken or its Task if it is running an animation. Doing so leaves windows orphaned and bad things happen when the system tries to retrieve the task assoicated with the windows during layout. Fixes the ugly output associated with bug 13440426. Change-Id: I9d5fc50a7cb6189160d51cee3c82f7813baee715 --- services/core/java/com/android/server/wm/WindowManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index be94ca704315..a4f960e73019 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -9432,7 +9432,7 @@ public class WindowManagerService extends IWindowManager.Stub mStackIdToStack.valueAt(stackNdx).mExitingAppTokens; for (i = exitingAppTokens.size() - 1; i >= 0; i--) { AppWindowToken token = exitingAppTokens.get(i); - if (!token.hasVisible && !mClosingApps.contains(token)) { + if (!token.hasVisible && !mClosingApps.contains(token) && !token.mDeferRemoval) { // Make sure there is no animation running on this token, // so any windows associated with it will be removed as // soon as their animations are complete -- cgit v1.2.3-59-g8ed1b