diff options
author | Jim Miller <jaggies@google.com> | 2010-12-17 18:23:23 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2010-12-21 18:35:23 -0800 |
commit | 9757e30dfa0ab691c4c15366568367e166071a7d (patch) | |
tree | ac779d231cbe470b852e1f7189a25908a6b595f0 /src/com/android/settings/ConfirmLockPassword.java | |
parent | 10fa99fe55fd9a96f92388b2e506c802c0a09ff9 (diff) | |
download | packages_apps_Settings-9757e30dfa0ab691c4c15366568367e166071a7d.tar.gz packages_apps_Settings-9757e30dfa0ab691c4c15366568367e166071a7d.tar.bz2 packages_apps_Settings-9757e30dfa0ab691c4c15366568367e166071a7d.zip |
Fix 3281395: Use breadcrumb area to display title for LockScreen
Change-Id: Icd631b4c70e7b9f6b9a8c24dd513aed259a22d6a
Diffstat (limited to 'src/com/android/settings/ConfirmLockPassword.java')
-rw-r--r-- | src/com/android/settings/ConfirmLockPassword.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/com/android/settings/ConfirmLockPassword.java b/src/com/android/settings/ConfirmLockPassword.java index d82458885..08e99ea6e 100644 --- a/src/com/android/settings/ConfirmLockPassword.java +++ b/src/com/android/settings/ConfirmLockPassword.java @@ -20,6 +20,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.PasswordEntryKeyboardHelper; import com.android.internal.widget.PasswordEntryKeyboardView; +import android.app.Activity; import android.app.Fragment; import android.app.admin.DevicePolicyManager; import android.content.Intent; @@ -94,9 +95,12 @@ public class ConfirmLockPassword extends PreferenceActivity { || DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == storedQuality; mHeaderText.setText(isAlpha ? R.string.lockpassword_confirm_your_password_header : R.string.lockpassword_confirm_your_pin_header); - mKeyboardHelper = new PasswordEntryKeyboardHelper(getActivity(), - mKeyboardView, mPasswordEntry); - mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA + + final Activity activity = getActivity(); + mKeyboardHelper = new PasswordEntryKeyboardHelper(activity, + mKeyboardView, mPasswordEntry); + mKeyboardHelper.setKeyboardMode(isAlpha ? + PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC); mKeyboardView.requestFocus(); @@ -104,6 +108,15 @@ public class ConfirmLockPassword extends PreferenceActivity { mPasswordEntry.setInputType(isAlpha ? currentType : (currentType | InputType.TYPE_CLASS_NUMBER)); + // Update the breadcrumb (title) if this is embedded in a PreferenceActivity + if (activity instanceof PreferenceActivity) { + final PreferenceActivity preferenceActivity = (PreferenceActivity) activity; + int id = isAlpha ? R.string.lockpassword_confirm_your_password_header + : R.string.lockpassword_confirm_your_pin_header; + CharSequence title = getText(id); + preferenceActivity.showBreadCrumbs(title, title); + } + return view; } |