Don't apply animations to windows that are showing
If a window is showing and not obscured by the keyguard, for
example windows on other displays, don't apply the enter animation.
This prevents jank on secondary displays when the keyguard is
unlocked.
Fixes bug 18689396
Change-Id: I2deb3030e6e887f57af9a5f1d42b1c71f06f7eeb
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index fe2e0a6..64713d9 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -355,7 +355,8 @@
boolean applyExistingExitAnimation = mPostKeyguardExitAnimation != null
&& !winAnimator.mKeyguardGoingAwayAnimation
&& win.hasDrawnLw()
- && win.mAttachedWindow == null;
+ && win.mAttachedWindow == null
+ && mForceHiding != KEYGUARD_NOT_SHOWN;
// If the window is already showing and we don't need to apply an existing
// Keyguard exit animation, skip.