From d2bf99e06841d8ad4a1cbcce0d6cb2d0e72fa67c Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Wed, 14 May 2025 17:34:43 -0700 Subject: [PATCH] Fix workUtilityView showing up before keyboard is up The reason is that there is extra translation applied to account for the all apps moving. Rather we should only offset any translation when -windowInsets.bottom < 0. bug: 416323265 Test: videos in bug Flag: EXEMPT bug fix Change-Id: I3565d3a2ee09f545c0d01aa0ce3da8f80a017308 --- .../android/launcher3/anim/KeyboardInsetAnimationCallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/anim/KeyboardInsetAnimationCallback.java b/src/com/android/launcher3/anim/KeyboardInsetAnimationCallback.java index 39386fa2ac..6806b0f802 100644 --- a/src/com/android/launcher3/anim/KeyboardInsetAnimationCallback.java +++ b/src/com/android/launcher3/anim/KeyboardInsetAnimationCallback.java @@ -100,7 +100,7 @@ public class KeyboardInsetAnimationCallback extends WindowInsetsAnimation.Callba } else { // Manually controlled animation: Set translation to keyboard height. int translationY = -windowInsets.getInsets(WindowInsets.Type.ime()).bottom; - if (mView.getParent() instanceof View) { + if (translationY < 0 && mView.getParent() instanceof View) { // Offset any translation of the parent (e.g. All Apps parallax). translationY -= ((View) mView.getParent()).getTranslationY(); }