Merge "Fix broken inset anims" into rvc-dev
diff --git a/core/java/android/view/InsetsAnimationControlImpl.java b/core/java/android/view/InsetsAnimationControlImpl.java
index 44ecb54..9a53a43 100644
--- a/core/java/android/view/InsetsAnimationControlImpl.java
+++ b/core/java/android/view/InsetsAnimationControlImpl.java
@@ -281,7 +281,7 @@
// 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()