summaryrefslogtreecommitdiffstats
path: root/policy/src/com
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2012-03-25 20:51:12 -0400
committerDanesh Mondegarian <daneshm90@gmail.com>2012-03-28 10:29:11 -0400
commitae8bfb06b90f27923d323e4efd20f06a4ee7601e (patch)
treec61514c2905f01bc391f56c64cabd4b2343fedee /policy/src/com
parentdf259ec5862965de15e120d3bea919d265a2a1a0 (diff)
downloadframeworks_base-ae8bfb06b90f27923d323e4efd20f06a4ee7601e.zip
frameworks_base-ae8bfb06b90f27923d323e4efd20f06a4ee7601e.tar.gz
frameworks_base-ae8bfb06b90f27923d323e4efd20f06a4ee7601e.tar.bz2
Quick unlock : Fix bug
There is an issue where users whose passwords are greater than 8 chars and have quick unlock enabled will be unable to unlock their lockscreen. This is due to the logic evaluating anything beyond 3chars as a password attempt. This change modifies the quick unlock behavior so that when typing the password, each character is considered an attempt, however if incorrect, is not reported as a failed attempt. Only when the user presses enter is it considered an "explicit" attempt and a failed attempt is reported. Patchset 2 : Rename runnable to better reflect its purpose Patchset 3 : Switch to new behavior Patchset 4 : Fix padding Change-Id: Ida6289c77f6724cb42e8d3b82593f29afe3d6d1b
Diffstat (limited to 'policy/src/com')
-rw-r--r--policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
index 798add6..dcfdb39 100644
--- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
@@ -35,18 +35,15 @@ import android.text.InputType;
import android.text.TextWatcher;
import android.text.method.DigitsKeyListener;
import android.text.method.TextKeyListener;
-import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.ViewGroup.LayoutParams;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.EditText;
import android.widget.LinearLayout;
-import android.widget.Space;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
@@ -184,17 +181,10 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
}
if (mQuickUnlock) {
String entry = mPasswordEntry.getText().toString();
- if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT) {
- if (mLockPatternUtils.checkPassword(entry)) {
+ if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT &&
+ mLockPatternUtils.checkPassword(entry)) {
mCallback.keyguardDone(true);
mCallback.reportSuccessfulUnlockAttempt();
- } else {
- mCallback.reportFailedUnlockAttempt();
- if (0 == (mUpdateMonitor.getFailedAttempts() % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
- long deadline = mLockPatternUtils.setLockoutAttemptDeadline();
- handleAttemptLockout(deadline);
- }
- }
}
}
}