From 8b1240b7cf61374b5d30831964eaa2405445177b Mon Sep 17 00:00:00 2001 From: Taran Singh Date: Tue, 11 Oct 2022 02:42:39 +0000 Subject: [PATCH] Disable InkWindow default animation By default all PhoneWindows use Theme_windowAnimationStyle which animates window up and down when gaining and losing focus respectively. For InkWindow we don't need any animation. Fix: 237331144 Fix: 245441579 Bug: 253477462 Test: atest StylusHandwritingTest Change-Id: I209b03dfbed386a2863921b49d43858037d380b8 --- core/java/android/inputmethodservice/InkWindow.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/inputmethodservice/InkWindow.java b/core/java/android/inputmethodservice/InkWindow.java index 469b52bd9185f..70bd5046524e5 100644 --- a/core/java/android/inputmethodservice/InkWindow.java +++ b/core/java/android/inputmethodservice/InkWindow.java @@ -53,6 +53,9 @@ final class InkWindow extends PhoneWindow { final LayoutParams attrs = getAttributes(); attrs.layoutInDisplayCutoutMode = LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; attrs.setFitInsetsTypes(0); + // disable window animations. + // TODO(b/253477462): replace with API when available + attrs.windowAnimations = -1; // TODO(b/210039666): use INPUT_FEATURE_NO_INPUT_CHANNEL once b/216179339 is fixed. setAttributes(attrs); // Ink window is not touchable with finger.