am 0292b8ee: am 73c3c377: am af37450f: am 52403d6f: Merge "Fix "Wrong password" message shown when using BT keyboard." into lmp-dev
* commit '0292b8ee8e79050cee206f80d5bfcad34d015d59': Fix "Wrong password" message shown when using BT keyboard.
This commit is contained in:
@@ -295,8 +295,14 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
|
|||||||
@Override
|
@Override
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
// Check if this was the result of hitting the enter key
|
// Check if this was the result of hitting the enter key
|
||||||
if (actionId == EditorInfo.IME_NULL || actionId == EditorInfo.IME_ACTION_DONE
|
final boolean isSoftImeEvent = event == null
|
||||||
|| actionId == EditorInfo.IME_ACTION_NEXT) {
|
&& (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();
|
verifyPasswordAndUnlock();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user