Loading packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit // How much we scale up the duration of the disappear animation when the current user is locked // How much we scale up the duration of the disappear animation when the current user is locked public static final float DISAPPEAR_MULTIPLIER_LOCKED = 1.5f; public static final float DISAPPEAR_MULTIPLIER_LOCKED = 1.5f; // Extra padding, in pixels, that should eat touch events. private static final int PATTERNS_TOUCH_AREA_EXTENSION = 40; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final AppearAnimationUtils mAppearAnimationUtils; private final AppearAnimationUtils mAppearAnimationUtils; private final DisappearAnimationUtils mDisappearAnimationUtils; private final DisappearAnimationUtils mDisappearAnimationUtils; Loading Loading @@ -204,9 +207,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit protected void onLayout(boolean changed, int l, int t, int r, int b) { protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); super.onLayout(changed, l, t, r, b); mLockPatternView.getLocationOnScreen(mTmpPosition); mLockPatternView.getLocationOnScreen(mTmpPosition); mLockPatternScreenBounds.set(mTmpPosition[0], mTmpPosition[1], mLockPatternScreenBounds.set(mTmpPosition[0] - PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[0] + mLockPatternView.getWidth(), mTmpPosition[1] - PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[1] + mLockPatternView.getHeight()); mTmpPosition[0] + mLockPatternView.getWidth() + PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[1] + mLockPatternView.getHeight() + PATTERNS_TOUCH_AREA_EXTENSION); } } @Override @Override Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe private static final float TOUCH_Y_MULTIPLIER = 0.25f; private static final float TOUCH_Y_MULTIPLIER = 0.25f; // How much you need to drag the bouncer to trigger an auth retry (in dps.) // How much you need to drag the bouncer to trigger an auth retry (in dps.) private static final float MIN_DRAG_SIZE = 10; private static final float MIN_DRAG_SIZE = 10; // How much to scale the default slop by, to avoid accidental drags. private static final float SLOP_SCALE = 2f; private KeyguardSecurityModel mSecurityModel; private KeyguardSecurityModel mSecurityModel; private LockPatternUtils mLockPatternUtils; private LockPatternUtils mLockPatternUtils; Loading Loading @@ -179,7 +181,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe return false; return false; } } int index = event.findPointerIndex(mActivePointerId); int index = event.findPointerIndex(mActivePointerId); int touchSlop = mViewConfiguration.getScaledTouchSlop(); float touchSlop = mViewConfiguration.getScaledTouchSlop() * SLOP_SCALE; if (mCurrentSecurityView != null && index != -1 if (mCurrentSecurityView != null && index != -1 && mStartTouchY - event.getY(index) > touchSlop) { && mStartTouchY - event.getY(index) > touchSlop) { mIsDragging = true; mIsDragging = true; Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit // How much we scale up the duration of the disappear animation when the current user is locked // How much we scale up the duration of the disappear animation when the current user is locked public static final float DISAPPEAR_MULTIPLIER_LOCKED = 1.5f; public static final float DISAPPEAR_MULTIPLIER_LOCKED = 1.5f; // Extra padding, in pixels, that should eat touch events. private static final int PATTERNS_TOUCH_AREA_EXTENSION = 40; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final AppearAnimationUtils mAppearAnimationUtils; private final AppearAnimationUtils mAppearAnimationUtils; private final DisappearAnimationUtils mDisappearAnimationUtils; private final DisappearAnimationUtils mDisappearAnimationUtils; Loading Loading @@ -204,9 +207,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit protected void onLayout(boolean changed, int l, int t, int r, int b) { protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); super.onLayout(changed, l, t, r, b); mLockPatternView.getLocationOnScreen(mTmpPosition); mLockPatternView.getLocationOnScreen(mTmpPosition); mLockPatternScreenBounds.set(mTmpPosition[0], mTmpPosition[1], mLockPatternScreenBounds.set(mTmpPosition[0] - PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[0] + mLockPatternView.getWidth(), mTmpPosition[1] - PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[1] + mLockPatternView.getHeight()); mTmpPosition[0] + mLockPatternView.getWidth() + PATTERNS_TOUCH_AREA_EXTENSION, mTmpPosition[1] + mLockPatternView.getHeight() + PATTERNS_TOUCH_AREA_EXTENSION); } } @Override @Override Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe private static final float TOUCH_Y_MULTIPLIER = 0.25f; private static final float TOUCH_Y_MULTIPLIER = 0.25f; // How much you need to drag the bouncer to trigger an auth retry (in dps.) // How much you need to drag the bouncer to trigger an auth retry (in dps.) private static final float MIN_DRAG_SIZE = 10; private static final float MIN_DRAG_SIZE = 10; // How much to scale the default slop by, to avoid accidental drags. private static final float SLOP_SCALE = 2f; private KeyguardSecurityModel mSecurityModel; private KeyguardSecurityModel mSecurityModel; private LockPatternUtils mLockPatternUtils; private LockPatternUtils mLockPatternUtils; Loading Loading @@ -179,7 +181,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe return false; return false; } } int index = event.findPointerIndex(mActivePointerId); int index = event.findPointerIndex(mActivePointerId); int touchSlop = mViewConfiguration.getScaledTouchSlop(); float touchSlop = mViewConfiguration.getScaledTouchSlop() * SLOP_SCALE; if (mCurrentSecurityView != null && index != -1 if (mCurrentSecurityView != null && index != -1 && mStartTouchY - event.getY(index) > touchSlop) { && mStartTouchY - event.getY(index) > touchSlop) { mIsDragging = true; mIsDragging = true; Loading