From 83360b3167f2c394125b74f655bc577070cb9cca Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 24 Aug 2009 18:43:32 -0700 Subject: [PATCH] Fix bug that would leave old windows around. The problem was instigated by another fix I made to keep windows around while their tokens are animating or preparing to animate. This then hit an issue where if the window's process died while its token was getting ready to animate, we would immediately hide the token, and when we then went to start the token animation we wouldn't do anything, leaving the old dummy animation in place and not allowing it to run. Now we clear the animation before hiding the token, to ensure the dummy animation is gone at this point. Change-Id: If83fadcce6815bc545c80fbdb82fe6972bbdf5ef --- services/java/com/android/server/WindowManagerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index f8ba058480e58..1384ede35fc86 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -8850,6 +8850,7 @@ public class WindowManagerService extends IWindowManager.Stub "Now opening app" + wtoken); wtoken.reportedVisible = false; wtoken.inPendingTransaction = false; + wtoken.animation = null; setTokenVisibilityLocked(wtoken, lp, true, transit, false); wtoken.updateReportedVisibilityLocked(); wtoken.showAllWindowsLocked(); @@ -8860,6 +8861,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "Now closing app" + wtoken); wtoken.inPendingTransaction = false; + wtoken.animation = null; setTokenVisibilityLocked(wtoken, lp, false, transit, false); wtoken.updateReportedVisibilityLocked(); // Force the allDrawn flag, because we want to start