OSDN Git Service

Should not report unsuccessful attempt if pattern size < minimal size
authorTony Mak <tonymak@google.com>
Wed, 20 Jul 2016 08:55:25 +0000 (09:55 +0100)
committerTony Mak <tonymak@google.com>
Wed, 20 Jul 2016 08:55:25 +0000 (09:55 +0100)
It is to align the behavior in personal side lock screen.

Change-Id: I811e72405615fbed85c2a4dc6b6cec51e4ad54f0
Fix: 30215101

src/com/android/settings/ConfirmLockPattern.java

index a2ce154..34dad58 100644 (file)
@@ -461,7 +461,8 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
             private void startCheckPattern(final List<LockPatternView.Cell> pattern,
                     final Intent intent) {
                 if (pattern.size() < LockPatternUtils.MIN_PATTERN_REGISTER_FAIL) {
-                    mCredentialCheckResultTracker.setResult(false, intent, 0, mEffectiveUserId);
+                    // Pattern size is less than the minimum, do not count it as an fail attempt.
+                    onPatternChecked(false, intent, 0, mEffectiveUserId, false /* newResult */);
                     return;
                 }