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

Commit af70181f authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Make accidental alarm deletion harder

Bug: 7308745

Change the thresholds for swipe speed and location so it is harder to
delete the alarm when swiping accidentally.
This is a temporary fix so we can postpone doing the deletion using CAB.

Change-Id: If06d08e838fa641b891594fddf061e8f6d889565
parent 164554c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
    <integer name="fade_duration">250</integer>

    <!-- Swipe constants -->
    <integer name="swipe_escape_velocity">100</integer>
    <integer name="swipe_escape_velocity">4000</integer>
    <integer name="escape_animation_duration">200</integer>
    <integer name="max_escape_animation_duration">400</integer>
    <integer name="max_dismiss_velocity">2000</integer>
+4 −4
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@ public class SwipeHelper {
    private float mMinAlpha = 0.5f;

    private float mPagingTouchSlop;
    private Callback mCallback;
    private int mSwipeDirection;
    private VelocityTracker mVelocityTracker;
    private final Callback mCallback;
    private final int mSwipeDirection;
    private final VelocityTracker mVelocityTracker;

    private float mInitialTouchPosX;
    private boolean mDragging;
@@ -398,7 +398,7 @@ public class SwipeHelper {
                    float currAnimViewSize = getSize(mCurrAnimView);
                    // Long swipe = translation of .4 * width
                    boolean childSwipedFarEnough = DISMISS_IF_SWIPED_FAR_ENOUGH
                            && translation > 0.4 * currAnimViewSize;
                            && translation > 0.55 * currAnimViewSize;
                    // Fast swipe = > escapeVelocity and translation of .1 *
                    // width
                    boolean childSwipedFastEnough = (Math.abs(velocity) > escapeVelocity)