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
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index f8ba058..1384ede 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -8850,6 +8850,7 @@
"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 @@
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