Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01b52bb2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Added interpolated blur animation for status bar" into rvc-dev am: 2ac0ece4 am: 441cd77a

Change-Id: I58b6cf7c1e8466d62f9c19925d1cc50f975bfaed
parents c7b9366a 441cd77a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ public class Interpolators {
    public static final Interpolator CUSTOM_40_40 = new PathInterpolator(0.4f, 0f, 0.6f, 1f);
    public static final Interpolator HEADS_UP_APPEAR = new HeadsUpAppearInterpolator();
    public static final Interpolator ICON_OVERSHOT = new PathInterpolator(0.4f, 0f, 0.2f, 1.4f);
    public static final Interpolator SHADE_ANIMATION =
            new PathInterpolator(0.6f, 0.02f, 0.4f, 0.98f);
    public static final Interpolator ICON_OVERSHOT_LESS
            = new PathInterpolator(0.4f, 0f, 0.2f, 1.1f);
    public static final Interpolator PANEL_CLOSE_ACCELERATED
+5 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import android.app.WallpaperManager
import android.util.Log
import android.util.MathUtils
import android.view.Choreographer
import android.view.View
import androidx.annotation.VisibleForTesting
@@ -225,7 +226,10 @@ class NotificationShadeDepthController @Inject constructor(
    private fun updateShadeBlur() {
        var newBlur = 0
        if (statusBarStateController.state == StatusBarState.SHADE) {
            newBlur = blurUtils.blurRadiusOfRatio(shadeExpansion)
            val animatedBlur =
                    Interpolators.SHADE_ANIMATION.getInterpolation(
                            MathUtils.constrain(shadeExpansion / 0.15f, 0f, 1f))
            newBlur = blurUtils.blurRadiusOfRatio(0.35f * animatedBlur + 0.65f * shadeExpansion)
        }
        shadeSpring.animateTo(newBlur)
    }