diff options
author | Jim Miller <jaggies@google.com> | 2011-01-17 17:00:44 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2011-01-19 20:12:34 -0800 |
commit | 688435833fea20c5aa9bc4305dc052e55bcec33c (patch) | |
tree | 90ea0d0d8deb77d14b9267e0f4a6e8a9e483f513 /policy | |
parent | 0a3dbf6f69a72d557afca69f006a407fbfc2482d (diff) | |
download | frameworks_base-688435833fea20c5aa9bc4305dc052e55bcec33c.zip frameworks_base-688435833fea20c5aa9bc4305dc052e55bcec33c.tar.gz frameworks_base-688435833fea20c5aa9bc4305dc052e55bcec33c.tar.bz2 |
Fix 3339257: Update lockscreen keyboard to fit Holo theme
This updates the lockscreen keyboard to be like the
latin-1 IME keyboard and updates it to fit the holo theme.
Fixed some minor issues addressed in review.
Change-Id: I3c6dd8f91be753510e6eadfa9ad913f77038947b
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java index eb4d930..5b80a93 100644 --- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java +++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java @@ -100,17 +100,27 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == quality || DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == quality; + // TODO: re-enable on phones with keyboards + final boolean isPhysicalKbShowing = false; mKeyboardView = (PasswordEntryKeyboardView) findViewById(R.id.keyboard); mKeyboardViewAlpha = (PasswordEntryKeyboardView) findViewById(R.id.keyboardAlpha); mPasswordEntry = (EditText) findViewById(R.id.passwordEntry); mPasswordEntry.setOnEditorActionListener(this); + mPasswordEntry.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + if (mIsAlpha && !isPhysicalKbShowing) { + mKeyboardViewAlpha.setVisibility( + mKeyboardViewAlpha.getVisibility() == View.VISIBLE + ? View.GONE : View.VISIBLE); + mCallback.pokeWakelock(); + } + } + }); mEmergencyCallButton = (Button) findViewById(R.id.emergencyCall); mEmergencyCallButton.setOnClickListener(this); mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton); mKeyboardHelper = new PasswordEntryKeyboardHelper(context, mKeyboardView, this, false); - // TODO: re-enable on phones with keyboards - boolean isPhysicalKbShowing = false; //mCreationHardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO; if (mKeyboardViewAlpha == null || !mIsAlpha) { mKeyboardHelper.setKeyboardMode(mIsAlpha ? @@ -123,24 +133,21 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen mKeyboardHelper.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC); mKeyboardHelperAlpha.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA); mKeyboardView.setVisibility(View.GONE); - mKeyboardViewAlpha.setVisibility(isPhysicalKbShowing ? View.INVISIBLE : View.VISIBLE); mPasswordEntry.setWidth(mKeyboardViewAlpha.getLayoutParams().width); } - mPasswordEntry.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0, - 0, 0); mPasswordEntry.requestFocus(); // This allows keyboards with overlapping qwerty/numeric keys to choose just the // numeric keys. if (mIsAlpha) { mPasswordEntry.setKeyListener(TextKeyListener.getInstance()); - mStatusView.setHelpMessage(R.string.keyguard_password_enter_password_code, - StatusView.LOCK_ICON); + // mStatusView.setHelpMessage(R.string.keyguard_password_enter_password_code, + // StatusView.LOCK_ICON); } else { mPasswordEntry.setKeyListener(DigitsKeyListener.getInstance()); - mStatusView.setHelpMessage(R.string.keyguard_password_enter_pin_code, - StatusView.LOCK_ICON); + //mStatusView.setHelpMessage(R.string.keyguard_password_enter_pin_code, + // StatusView.LOCK_ICON); } mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ? |