summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Craig Mautner <cmautner@google.com> 2012-02-27 16:28:15 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2012-02-27 16:28:15 -0800
commit41c31ef3fa1acf18f5fce3fcf1b2f5c6fd344fd6 (patch)
tree038460795f96d78599cbe5cf0e1429277ade115a
parent2b1769fe26de5d1d7aa34e3c133dedc17341d82d (diff)
parent83eaab5b43e479c85dc112a1f9b3e53e907bae1f (diff)
Merge "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."
-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.