diff options
author | Brad Fitzpatrick <bradfitz@android.com> | 2010-11-03 11:46:54 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@android.com> | 2010-11-08 11:22:01 -0800 |
commit | 3fe3851753e3623d3c7c468efa6ee17f17f9aa74 (patch) | |
tree | b2024bc364b286ba52e359706ce4084c4fbcbb75 /services/java/com/android/server/WindowManagerService.java | |
parent | d57c14f95ee9cfa199e874f7993f4b9bf4f418de (diff) |
Window manager: cancel animations before losing references to them.
For possible future changes to android.view.animation.Animation to tie
into StrictMode's animation annotations on violations.
Change-Id: I3a23fa9bd5edb0500586bb0e341f83f998b28ae7
Diffstat (limited to 'services/java/com/android/server/WindowManagerService.java')
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 1be74d3b327d..c74a27c0dfdd 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -2736,7 +2736,10 @@ public class WindowManagerService extends IWindowManager.Stub displayed = !win.isVisibleLw(); if (win.mExiting) { win.mExiting = false; - win.mAnimation = null; + if (win.mAnimation != null) { + win.mAnimation.cancel(); + win.mAnimation = null; + } } if (win.mDestroying) { win.mDestroying = false; @@ -6903,6 +6906,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mAnimation != null) { mAnimating = true; mLocalAnimating = false; + mAnimation.cancel(); mAnimation = null; } } @@ -7174,6 +7178,7 @@ public class WindowManagerService extends IWindowManager.Stub // starting window, so there is no need for it to also // be doing its own stuff. if (mAnimation != null) { + mAnimation.cancel(); mAnimation = null; // Make sure we clean up the animation. mAnimating = true; @@ -7219,7 +7224,11 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ANIM) Slog.v( TAG, "Finished animation in " + this + " @ " + currentTime); - mAnimation = null; + + if (mAnimation != null) { + mAnimation.cancel(); + mAnimation = null; + } //WindowManagerService.this.dump(); } mHasLocalTransformation = false; @@ -7248,6 +7257,7 @@ public class WindowManagerService extends IWindowManager.Stub // clear it and make sure we run the cleanup code. mAnimating = true; mLocalAnimating = true; + mAnimation.cancel(); mAnimation = null; } @@ -7262,7 +7272,10 @@ public class WindowManagerService extends IWindowManager.Stub mAnimating = false; mLocalAnimating = false; - mAnimation = null; + if (mAnimation != null) { + mAnimation.cancel(); + mAnimation = null; + } mAnimLayer = mLayer; if (mIsImWindow) { mAnimLayer += mInputMethodAnimLayerAdjustment; |