diff options
Diffstat (limited to 'services/core/java/com/android/server/wm/WindowStateAnimator.java')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowStateAnimator.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index e9023fd..b42c8eb 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -251,11 +251,21 @@ class WindowStateAnimator { && mAppAnimator.animation == AppWindowAnimator.sDummyAnimation; } - /** Is this window currently animating? */ + /** Is this window currently set to animate or currently animating? + * NOTE: The method will return true for cases where the window isn't currently animating, but + * is set to animate. i.e. if the window animation is currently set to a dummy placeholder + * animation. Use {@link #isWindowAnimatingNow} to know if the window is currently running a + * real animation. */ boolean isWindowAnimating() { return mAnimation != null; } + /** Is the window performing a real animation and not a dummy which is only waiting for an + * an animation to start? */ + boolean isWindowAnimatingNow() { + return isWindowAnimating() && !isDummyAnimation(); + } + void cancelExitAnimationForNextAnimationLocked() { if (mAnimation != null) { mAnimation.cancel(); |