diff options
author | Adrian Roos <roosa@google.com> | 2015-02-03 19:58:19 +0100 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2015-02-03 19:58:19 +0100 |
commit | 4c00a611835e2257502ddcdd26b4e827c5b64f80 (patch) | |
tree | eca359b49dd2c9bee0bbe8610bdb776b95f1b637 /src/com/android/settings/ChooseLockPassword.java | |
parent | 183679655905b77e89477b056654ccc7a7a5a9a5 (diff) | |
download | packages_apps_Settings-4c00a611835e2257502ddcdd26b4e827c5b64f80.tar.gz packages_apps_Settings-4c00a611835e2257502ddcdd26b4e827c5b64f80.tar.bz2 packages_apps_Settings-4c00a611835e2257502ddcdd26b4e827c5b64f80.zip |
Ensure new credentails are valid
Follow-up to I6f369eb60f8f6bb1e33384cd06534c713ab52e79
Bug: 18931518
Change-Id: I311b255a034b0cec8fee70b0f4938e6ebb20d95e
Diffstat (limited to 'src/com/android/settings/ChooseLockPassword.java')
-rw-r--r-- | src/com/android/settings/ChooseLockPassword.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java index bbe3bbbc0..b85daa77a 100644 --- a/src/com/android/settings/ChooseLockPassword.java +++ b/src/com/android/settings/ChooseLockPassword.java @@ -101,7 +101,7 @@ public class ChooseLockPassword extends SettingsActivity { private static final String KEY_FIRST_PIN = "first_pin"; private static final String KEY_UI_STAGE = "ui_stage"; private TextView mPasswordEntry; - private int mPasswordMinLength = 4; + private int mPasswordMinLength = LockPatternUtils.MIN_LOCK_PASSWORD_SIZE; private int mPasswordMaxLength = 16; private int mPasswordMinLetters = 0; private int mPasswordMinUpperCase = 0; @@ -178,9 +178,10 @@ public class ChooseLockPassword extends SettingsActivity { } mRequestedQuality = Math.max(intent.getIntExtra(LockPatternUtils.PASSWORD_TYPE_KEY, mRequestedQuality), mLockPatternUtils.getRequestedPasswordQuality()); - mPasswordMinLength = Math.max( - intent.getIntExtra(PASSWORD_MIN_KEY, mPasswordMinLength), mLockPatternUtils - .getRequestedMinimumPasswordLength()); + mPasswordMinLength = Math.max(Math.max( + LockPatternUtils.MIN_LOCK_PASSWORD_SIZE, + intent.getIntExtra(PASSWORD_MIN_KEY, mPasswordMinLength)), + mLockPatternUtils.getRequestedMinimumPasswordLength()); mPasswordMaxLength = intent.getIntExtra(PASSWORD_MAX_KEY, mPasswordMaxLength); mPasswordMinLetters = Math.max(intent.getIntExtra(PASSWORD_MIN_LETTERS_KEY, mPasswordMinLetters), mLockPatternUtils.getRequestedPasswordMinimumLetters()); |