Loading packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -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. Loading Loading @@ -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; } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -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. Loading Loading @@ -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; } } Loading