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
This commit is contained in:
Brandon Dayauon
2025-05-14 17:34:43 -07:00
parent dda022a19b
commit d2bf99e068
@@ -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();
}