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

Commit df5501b0 authored by Selim Cinek's avatar Selim Cinek
Browse files

Adapted the interpolator when using fingerprint

When using fingerprint and when launching without touch
we are now using a different interpolator.

Test: unlock with fingerprint, unlock after double-tap, observe different interpolator
Change-Id: If1b63340759089cdf55820d59b6dcce2ca8bed6d
Fixes: 37311479
parent 69e76f96
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,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 PANEL_CLOSE_ACCELERATED
            = new PathInterpolator(0.3f, 0, 0.5f, 1);

    /**
     * Interpolator to be used when animating a move based on a click. Pair with enough duration.
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
    /**
     * How much faster we collapse the lockscreen when authenticating with fingerprint.
     */
    private static final float FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR = 1.3f;
    private static final float FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR = 1.1f;

    private PowerManager mPowerManager;
    private Handler mHandler = new Handler();
+1 −1
Original line number Diff line number Diff line
@@ -2022,7 +2022,7 @@ public class NotificationPanelView extends PanelView implements
    @Override
    protected boolean shouldUseDismissingAnimation() {
        return mStatusBarState != StatusBarState.SHADE
                && !mStatusBar.isKeyguardCurrentlySecure();
                && (!mStatusBar.isKeyguardCurrentlySecure() || !isTracking());
    }

    @Override
+8 −2
Original line number Diff line number Diff line
@@ -725,8 +725,14 @@ public abstract class PanelView extends FrameLayout {
            }
        } else {
            if (shouldUseDismissingAnimation()) {
                if (vel == 0) {
                    animator.setInterpolator(Interpolators.PANEL_CLOSE_ACCELERATED);
                    long duration = (long) (200 + mExpandedHeight / getHeight() * 100);
                    animator.setDuration(duration);
                } else {
                    mFlingAnimationUtilsDismissing.apply(animator, mExpandedHeight, target, vel,
                            getHeight());
                }
            } else {
                mFlingAnimationUtilsClosing
                        .apply(animator, mExpandedHeight, target, vel, getHeight());