Skip to content

Commit 5d8d169

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Fix wrong pattern count in keyguard pattern security view." into jb-mr1-dev
2 parents 4adb9d3 + d2b82f7 commit 5d8d169

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public KeyguardHostView(Context context, AttributeSet attrs) {
110110
}
111111

112112
@Override
113-
public boolean dispatchTouchEvent(MotionEvent ev) {
114-
boolean result = super.dispatchTouchEvent(ev);
113+
public boolean onTouchEvent(MotionEvent ev) {
114+
boolean result = super.onTouchEvent(ev);
115115
mTempRect.set(0, 0, 0, 0);
116116
offsetRectIntoDescendantCoords(mSecurityViewContainer, mTempRect);
117117
ev.offsetLocation(mTempRect.left, mTempRect.top);

policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ private void updateFooter(FooterMode mode) {
157157
}
158158

159159
@Override
160-
public boolean dispatchTouchEvent(MotionEvent ev) {
161-
boolean result = super.dispatchTouchEvent(ev);
160+
public boolean onTouchEvent(MotionEvent ev) {
161+
boolean result = super.onTouchEvent(ev);
162162
// as long as the user is entering a pattern (i.e sending a touch event that was handled
163163
// by this screen), keep poking the wake lock so that the screen will stay on.
164164
final long elapsed = SystemClock.elapsedRealtime() - mLastPokeTime;
@@ -237,10 +237,11 @@ public void onPatternCellAdded(List<LockPatternView.Cell> pattern) {
237237

238238
public void onPatternDetected(List<LockPatternView.Cell> pattern) {
239239
if (mLockPatternUtils.checkPattern(pattern)) {
240+
mCallback.reportSuccessfulUnlockAttempt();
240241
mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct);
241-
mCallback.dismiss(true); // keyguardDone(true)
242242
KeyStore.getInstance().password(LockPatternUtils.patternToString(pattern));
243243
mTotalFailedPatternAttempts = 0;
244+
mCallback.dismiss(true);
244245
} else {
245246
if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) {
246247
mCallback.userActivity(UNLOCK_PATTERN_WAKE_INTERVAL_MS);

policy/src/com/android/internal/policy/impl/keyguard/KeyguardSecurityViewFlipper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public KeyguardSecurityViewFlipper(Context context, AttributeSet attr) {
4040
}
4141

4242
@Override
43-
public boolean dispatchTouchEvent(MotionEvent ev) {
44-
boolean result = super.dispatchTouchEvent(ev);
43+
public boolean onTouchEvent(MotionEvent ev) {
44+
boolean result = super.onTouchEvent(ev);
4545
mTempRect.set(0, 0, 0, 0);
4646
for (int i = 0; i < getChildCount(); i++) {
4747
View child = getChildAt(i);

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ private void maybeCreateKeyguardLocked(boolean enableScreenRotation) {
131131
mKeyguardHost = new ViewManagerHost(mContext);
132132

133133
int flags = WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
134-
| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER
135-
| WindowManager.LayoutParams.FLAG_SLIPPERY;
134+
| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
136135

137136
if (!mNeedsInput) {
138137
flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;

0 commit comments

Comments
 (0)