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.
This commit is contained in:
Jim Miller
2014-10-08 18:15:24 +00:00
committed by Android Git Automerger

View File

@@ -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;
}