From cb17f1895253dfccba85f2e35e6d51ff8050fa86 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 11 Dec 2014 11:24:32 -0800 Subject: [PATCH] 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 --- services/core/java/com/android/server/wm/WindowAnimator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index fe2e0a65a209c..64713d9887776 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 @@ public class WindowAnimator { 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.