diff options
author | Jim Miller <jaggies@google.com> | 2014-10-08 18:15:24 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-08 18:15:24 +0000 |
commit | af37450f41f6834979f1312e61ec550d2a0d665e (patch) | |
tree | 70788e764ec117976e8af725216e9740c39c5746 /packages | |
parent | e95638f5ec70708dc7ae5f6220f7421119b4ccfc (diff) | |
parent | 52403d6f8e9a0e31a0f880a9cd297aeb35c29c8e (diff) | |
download | frameworks_base-af37450f41f6834979f1312e61ec550d2a0d665e.zip frameworks_base-af37450f41f6834979f1312e61ec550d2a0d665e.tar.gz frameworks_base-af37450f41f6834979f1312e61ec550d2a0d665e.tar.bz2 |
am 52403d6f: Merge "Fix "Wrong password" message shown when using BT keyboard." into lmp-dev
* commit '52403d6f8e9a0e31a0f880a9cd297aeb35c29c8e':
Fix "Wrong password" message shown when using BT keyboard.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java index e6c9e6c..dfea166 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java @@ -295,8 +295,14 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { // Check if this was the result of hitting the enter key - if (actionId == EditorInfo.IME_NULL || actionId == EditorInfo.IME_ACTION_DONE - || actionId == EditorInfo.IME_ACTION_NEXT) { + final boolean isSoftImeEvent = event == null + && (actionId == EditorInfo.IME_NULL + || actionId == EditorInfo.IME_ACTION_DONE + || actionId == EditorInfo.IME_ACTION_NEXT); + final boolean isKeyboardEnterKey = event != null + && KeyEvent.isConfirmKey(event.getKeyCode()) + && event.getAction() == KeyEvent.ACTION_DOWN; + if (isSoftImeEvent || isKeyboardEnterKey) { verifyPasswordAndUnlock(); return true; } |