diff options
author | Jim Miller <jaggies@google.com> | 2010-03-25 18:45:22 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2010-03-25 18:45:22 -0700 |
commit | af366a3ed66dcb3c3ecb1dd101e5d8869b518598 (patch) | |
tree | c59211ec91ec91c015471efbe4a0668748699a05 /src/com/android/settings/ConfirmLockPassword.java | |
parent | a6a74e222a994e29a1daa7178943a1fc9dd06c47 (diff) | |
download | packages_apps_Settings-af366a3ed66dcb3c3ecb1dd101e5d8869b518598.tar.gz packages_apps_Settings-af366a3ed66dcb3c3ecb1dd101e5d8869b518598.tar.bz2 packages_apps_Settings-af366a3ed66dcb3c3ecb1dd101e5d8869b518598.zip |
Fix 2535700: Add support for enforcing password quality
Change-Id: I908b4229d46061f3d450adec72b04276fe10afc1
Diffstat (limited to 'src/com/android/settings/ConfirmLockPassword.java')
-rw-r--r-- | src/com/android/settings/ConfirmLockPassword.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/settings/ConfirmLockPassword.java b/src/com/android/settings/ConfirmLockPassword.java index eedbc28f2..6bc135b01 100644 --- a/src/com/android/settings/ConfirmLockPassword.java +++ b/src/com/android/settings/ConfirmLockPassword.java @@ -21,6 +21,7 @@ import com.android.internal.widget.PasswordEntryKeyboardHelper; import com.android.internal.widget.PasswordEntryKeyboardView; import android.app.Activity; +import android.app.admin.DevicePolicyManager; import android.os.Bundle; import android.os.Handler; import android.text.Editable; @@ -51,7 +52,7 @@ public class ConfirmLockPassword extends Activity implements OnClickListener, } private void initViews() { - int mode = mLockPatternUtils.getPasswordMode(); + final int storedQuality = mLockPatternUtils.getKeyguardStoredPasswordQuality(); setContentView(R.layout.confirm_lock_password); // Disable IME on our window since we provide our own keyboard getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, @@ -63,8 +64,8 @@ public class ConfirmLockPassword extends Activity implements OnClickListener, mPasswordEntry.setOnEditorActionListener(this); mKeyboardView = (PasswordEntryKeyboardView) findViewById(R.id.keyboard); mHeaderText = (TextView) findViewById(R.id.headerText); - final boolean isAlpha = - LockPatternUtils.MODE_PASSWORD == mLockPatternUtils.getPasswordMode(); + final boolean isAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality + || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality; mHeaderText.setText(isAlpha ? R.string.lockpassword_confirm_your_password_header : R.string.lockpassword_confirm_your_pin_header); mKeyboardHelper = new PasswordEntryKeyboardHelper(this, mKeyboardView, mPasswordEntry); |