diff options
author | Xiyuan Xia <xiyuan@google.com> | 2015-05-21 16:22:41 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-05-21 16:22:41 +0000 |
commit | 6994443edb7eb8f0530e3599f498c471b626663b (patch) | |
tree | e225bbbc21ead3d9a3e9c8ef9f97a316191d4046 /packages/Keyguard | |
parent | 60574a02d80d584e7f563056d18fc340ce29baa3 (diff) | |
parent | e695b59eb586eeda064b715b5e35f4e491039e33 (diff) | |
download | frameworks_base-6994443edb7eb8f0530e3599f498c471b626663b.zip frameworks_base-6994443edb7eb8f0530e3599f498c471b626663b.tar.gz frameworks_base-6994443edb7eb8f0530e3599f498c471b626663b.tar.bz2 |
am e695b59e: Merge "Do not show soft keyboard when locked out on keyguard UI" into mnc-dev
* commit 'e695b59eb586eeda064b715b5e35f4e491039e33':
Do not show soft keyboard when locked out on keyguard UI
Diffstat (limited to 'packages/Keyguard')
3 files changed, 19 insertions, 3 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java index 54bbd5a..6295de4 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -110,7 +110,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected void verifyPasswordAndUnlock() { final String entry = getPasswordText(); - setPasswordEntryEnabled(false); + setPasswordEntryInputEnabled(false); if (mPendingLockCheck != null) { mPendingLockCheck.cancel(false); } @@ -121,7 +121,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout new LockPatternChecker.OnCheckCallback() { @Override public void onChecked(boolean matched) { - setPasswordEntryEnabled(true); + setPasswordEntryInputEnabled(true); mPendingLockCheck = null; onPasswordChecked(entry, matched); } @@ -152,6 +152,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected abstract void resetPasswordText(boolean animate); protected abstract String getPasswordText(); protected abstract void setPasswordEntryEnabled(boolean enabled); + protected abstract void setPasswordEntryInputEnabled(boolean enabled); // Prevent user from using the PIN/Password entry until scheduled deadline. protected void handleAttemptLockout(long elapsedRealtimeDeadline) { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java index f18c451..c9ad728 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java @@ -74,7 +74,12 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView protected void resetState() { mSecurityMessageDisplay.setMessage(R.string.kg_password_instructions, false); + final boolean wasDisabled = mPasswordEntry.isEnabled(); setPasswordEntryEnabled(true); + setPasswordEntryInputEnabled(true); + if (wasDisabled) { + mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT); + } } @Override @@ -95,7 +100,7 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView post(new Runnable() { @Override public void run() { - if (isShown()) { + if (isShown() && mPasswordEntry.isEnabled()) { mPasswordEntry.requestFocus(); if (reason != KeyguardSecurityView.SCREEN_ON || mShowImeAtScreenOn) { mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT); @@ -190,6 +195,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView @Override protected void setPasswordEntryEnabled(boolean enabled) { + mPasswordEntry.setEnabled(enabled); + } + + @Override + protected void setPasswordEntryInputEnabled(boolean enabled) { mPasswordEntryDisabler.setInputEnabled(enabled); } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java index 84b4cf8..ed0d4af 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java @@ -72,6 +72,11 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView } @Override + protected void setPasswordEntryInputEnabled(boolean enabled) { + mPasswordEntry.setEnabled(enabled); + } + + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (KeyEvent.isConfirmKey(keyCode)) { performClick(mOkButton); |