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

Commit 455b60fe authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add better information for invalid path"

parents 43c77abf 8e2189dc
Loading
Loading
Loading
Loading
+12 −3
Original line number Original line Diff line number Diff line
@@ -18,12 +18,14 @@ package com.android.systemui.statusbar;


import android.animation.Animator;
import android.animation.Animator;
import android.content.Context;
import android.content.Context;
import android.util.Log;
import android.view.ViewPropertyAnimator;
import android.view.ViewPropertyAnimator;
import android.view.animation.Interpolator;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
import android.view.animation.PathInterpolator;


import com.android.systemui.Interpolators;
import com.android.systemui.Interpolators;
import com.android.systemui.statusbar.notification.NotificationUtils;
import com.android.systemui.statusbar.notification.NotificationUtils;
import com.android.systemui.statusbar.phone.StatusBar;


/**
/**
 * Utility class to calculate general fling animation when the finger is released.
 * Utility class to calculate general fling animation when the finger is released.
@@ -196,9 +198,16 @@ public class FlingAnimationUtils {
        if (startGradient != mCachedStartGradient
        if (startGradient != mCachedStartGradient
                || velocityFactor != mCachedVelocityFactor) {
                || velocityFactor != mCachedVelocityFactor) {
            float speedup = mSpeedUpFactor * (1.0f - velocityFactor);
            float speedup = mSpeedUpFactor * (1.0f - velocityFactor);
            mInterpolator = new PathInterpolator(speedup,
            float x1 = speedup;
                    speedup * startGradient,
            float y1 = speedup * startGradient;
                    mLinearOutSlowInX2, mY2);
            float x2 = mLinearOutSlowInX2;
            float y2 = mY2;
            try {
                mInterpolator = new PathInterpolator(x1, y1, x2, y2);
            } catch (IllegalArgumentException e) {
                throw new IllegalArgumentException("Illegal path with "
                        + "x1=" + x1 + " y1=" + y1 + " x2=" + x2 + " y2=" + y2, e);
            }
            mCachedStartGradient = startGradient;
            mCachedStartGradient = startGradient;
            mCachedVelocityFactor = velocityFactor;
            mCachedVelocityFactor = velocityFactor;
        }
        }