summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Craig Mautner <cmautner@google.com> 2012-02-27 16:15:13 -0800
committer Craig Mautner <cmautner@google.com> 2012-02-27 16:15:13 -0800
commit83eaab5b43e479c85dc112a1f9b3e53e907bae1f (patch)
tree47455cfb73ff6c791000ba8610204913b5dbd871
parent4709a11b5dcb0abb5f8518e0404b67a0912c0167 (diff)
Fix bug introduced when moving animation step out from between assignments to wasAnimating and nowAnimating.
Now wasAnimating once again contains the animation state prior to the animation step. Change-Id: I2b53bd3f62228183233ab36f0ebe44c0344d2351
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java2
-rw-r--r--services/java/com/android/server/wm/WindowState.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 21cb3e8dd975..96142a1bb29e 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -7685,7 +7685,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
- final boolean wasAnimating = w.mAnimating;
+ final boolean wasAnimating = w.mWasAnimating;
// If the window has moved due to its containing
// content frame changing, then we'd like to animate
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index d7a7cb0d34a3..fc435f71b482 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -91,6 +91,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
boolean mAttachedHidden; // is our parent window hidden?
boolean mLastHidden; // was this window last hidden?
boolean mWallpaperVisible; // for wallpaper, what was last vis report?
+ boolean mWasAnimating; // Were we animating going into the most recent animation step?
/**
* The window size that was requested by the application. These are in
@@ -979,6 +980,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
// This must be called while inside a transaction. Returns true if
// there is more animation to run.
boolean stepAnimationLocked(long currentTime) {
+ // Save the animation state as it was before this step so WindowManagerService can tell if
+ // we just started or just stopped animating by comparing mWasAnimating with isAnimating().
+ mWasAnimating = isAnimating();
if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) {
// We will run animations as long as the display isn't frozen.