From 4c00a611835e2257502ddcdd26b4e827c5b64f80 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Tue, 3 Feb 2015 19:58:19 +0100 Subject: Ensure new credentails are valid Follow-up to I6f369eb60f8f6bb1e33384cd06534c713ab52e79 Bug: 18931518 Change-Id: I311b255a034b0cec8fee70b0f4938e6ebb20d95e --- src/com/android/settings/ChooseLockPassword.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/com/android/settings/ChooseLockPassword.java') 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()); -- cgit v1.2.3