Merge "Fix text crossfade" into tm-dev am: 426c815c77

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18360762

Change-Id: I8964cce7227d134bf59318be33ed48b9acc7ebb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Lucas Dupin
2022-05-18 21:27:38 +00:00
committed by Automerger Merge Worker

View File

@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.notification; package com.android.systemui.statusbar.notification;
import android.util.MathUtils;
import android.util.Pools; import android.util.Pools;
import android.view.View; import android.view.View;
import android.view.animation.Interpolator; import android.view.animation.Interpolator;
@@ -98,7 +99,10 @@ public class TransformState {
if (sameAs(otherState)) { if (sameAs(otherState)) {
ensureVisible(); ensureVisible();
} else { } else {
CrossFadeHelper.fadeIn(mTransformedView, transformationAmount, true /* remap */); CrossFadeHelper.fadeIn(
mTransformedView,
MathUtils.constrainedMap(0, 1, 0.45f, 1, transformationAmount),
false /* remap */);
} }
transformViewFullyFrom(otherState, transformationAmount); transformViewFullyFrom(otherState, transformationAmount);
} }
@@ -294,7 +298,10 @@ public class TransformState {
} }
return false; return false;
} else { } else {
CrossFadeHelper.fadeOut(mTransformedView, transformationAmount); CrossFadeHelper.fadeOut(
mTransformedView,
MathUtils.constrainedMap(0, 1, 0, 0.55f, transformationAmount),
false /* remap */);
} }
transformViewFullyTo(otherState, transformationAmount); transformViewFullyTo(otherState, transformationAmount);
return true; return true;