From b71e6892f12a5704288ef7f9ec83bd7686ba6f52 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Tue, 3 Mar 2020 00:38:47 +0100 Subject: [PATCH] Fix broken inset anims Parameters were correctly flipped but usages weren't. Test: Open IME Bug: 118118435 Change-Id: Ib0c417216b8e586c633c4607a9eb979e83b50231 --- core/java/android/view/InsetsAnimationControlImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/InsetsAnimationControlImpl.java b/core/java/android/view/InsetsAnimationControlImpl.java index 35098cbd3103e..f3e9472d38848 100644 --- a/core/java/android/view/InsetsAnimationControlImpl.java +++ b/core/java/android/view/InsetsAnimationControlImpl.java @@ -275,7 +275,7 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll // If the system is controlling the insets source, the leash can be null. if (leash != null) { // TODO: use a better interpolation for fade. - alpha = mFade ? ((float) maxInset / inset * 0.3f + 0.7f) : alpha; + alpha = mFade ? ((float) inset / maxInset * 0.3f + 0.7f) : alpha; surfaceParams.add(new SurfaceParams(leash, side == ISIDE_FLOATING ? 1 : alpha, mTmpMatrix, null /* windowCrop */, 0 /* layer */, 0f /* cornerRadius*/, side == ISIDE_FLOATING ? state.getSource(source.getType()).isVisible()