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

Commit fc8de93e authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Do not let pattern be dragged

Test: drag accross pattern
Test: start dragging from edges
Test: start drawing, drag outside the bounds
Test: repeat on small and large device
Fixes: 132687980
Change-Id: Idab9279dd7cb002cbd43aab0ce1d48f265d39f04
parent 027ffd9d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -626,6 +626,13 @@ public class LockPatternView extends View {
        invalidate();
    }

    /**
     * If there are any cells being drawn.
     */
    public boolean isEmpty() {
        return mPattern.isEmpty();
    }

    /**
     * Clear the pattern lookup table. Also reset the line fade start times for
     * the next attempt.
+2 −1
Original line number Diff line number Diff line
@@ -248,7 +248,8 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit

    @Override
    public boolean disallowInterceptTouch(MotionEvent event) {
        return mLockPatternScreenBounds.contains((int) event.getRawX(), (int) event.getRawY());
        return !mLockPatternView.isEmpty()
                || mLockPatternScreenBounds.contains((int) event.getRawX(), (int) event.getRawY());
    }

    /** TODO: hook this up */
+1 −2
Original line number Diff line number Diff line
@@ -271,8 +271,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
        mSwipeUpToRetry = mUnlockMethodCache.isUnlockingWithFacePossible()
                && securityMode != SecurityMode.SimPin
                && securityMode != SecurityMode.SimPuk
                && securityMode != SecurityMode.None
                && securityMode != SecurityMode.Pattern;
                && securityMode != SecurityMode.None;
    }

    public CharSequence getTitle() {