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
This commit is contained in:
Taran Singh
2022-10-11 02:42:39 +00:00
parent f5cc004e5e
commit 8b1240b7cf

View File

@@ -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.