summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2019-05-20 19:10:22 -0700
committerLucas Dupin <dupin@google.com>2019-05-20 19:19:45 -0700
commitabb18f4cd9a8b16c2d10a9e65ecbb73122b23be2 (patch)
tree8ac145c5aa1073967f5dfb7304aecf5213fef09d /packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
parentf36fee3cf764838aa8b1f59142e82049e4cbacb1 (diff)
Bouncer retry polish
Fixes: 133192281 Test: manually drag pattern and pin areas Change-Id: I2746badd64350416fd4c62b717a098a2fc1ce136
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
index 0e91e4109ec0..d8086da277f2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
@@ -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
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 AppearAnimationUtils mAppearAnimationUtils;
private final DisappearAnimationUtils mDisappearAnimationUtils;
@@ -204,9 +207,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
mLockPatternView.getLocationOnScreen(mTmpPosition);
- mLockPatternScreenBounds.set(mTmpPosition[0], mTmpPosition[1],
- mTmpPosition[0] + mLockPatternView.getWidth(),
- mTmpPosition[1] + mLockPatternView.getHeight());
+ mLockPatternScreenBounds.set(mTmpPosition[0] - PATTERNS_TOUCH_AREA_EXTENSION,
+ mTmpPosition[1] - PATTERNS_TOUCH_AREA_EXTENSION,
+ mTmpPosition[0] + mLockPatternView.getWidth() + PATTERNS_TOUCH_AREA_EXTENSION,
+ mTmpPosition[1] + mLockPatternView.getHeight() + PATTERNS_TOUCH_AREA_EXTENSION);
}
@Override