From 49f713eaf2115e84c54f6278ed83eaf2d8c7e1bc Mon Sep 17 00:00:00 2001 From: Issei Suzuki Date: Fri, 25 Jun 2021 17:31:52 +0200 Subject: [PATCH] Don't apply remote animation on IME when keyguad is going away. Test: manual. 1. set lock mode to password 2. push power button to go to the lock screen. 3. swipe up to show password input screen. 4. input correct password. 5. verify keyguard is faded out without flicker. Bug: 191518142 Change-Id: Ia9b55d786fda040df658889c90040326d5c8aa6a --- .../com/android/server/wm/NonAppWindowAnimationAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/NonAppWindowAnimationAdapter.java b/services/core/java/com/android/server/wm/NonAppWindowAnimationAdapter.java index b1e12b685fb4e..d230936b5d51b 100644 --- a/services/core/java/com/android/server/wm/NonAppWindowAnimationAdapter.java +++ b/services/core/java/com/android/server/wm/NonAppWindowAnimationAdapter.java @@ -99,8 +99,10 @@ class NonAppWindowAnimationAdapter implements AnimationAdapter { final WindowManagerPolicy policy = service.mPolicy; service.mRoot.forAllWindows(nonAppWindow -> { + // Animation on the IME window is controlled via Insets. if (nonAppWindow.mActivityRecord == null && policy.canBeHiddenByKeyguardLw(nonAppWindow) - && nonAppWindow.wouldBeVisibleIfPolicyIgnored() && !nonAppWindow.isVisible()) { + && nonAppWindow.wouldBeVisibleIfPolicyIgnored() && !nonAppWindow.isVisible() + && nonAppWindow != service.mRoot.getCurrentInputMethodWindow()) { final NonAppWindowAnimationAdapter nonAppAdapter = new NonAppWindowAnimationAdapter( nonAppWindow, durationHint, statusBarTransitionDelay); adaptersOut.add(nonAppAdapter);