diff options
author | Xiyuan Xia <xiyuan@google.com> | 2015-05-26 21:05:24 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-26 21:05:27 +0000 |
commit | a4e0492c11fb7b02c9a536ea4935e649e97c8c2d (patch) | |
tree | 39c6af5647e37468bd4e2c3139b095be7965e2a4 | |
parent | 44fb627cf67dfa3b9c2c625fd39ca8e9a9829813 (diff) | |
parent | 4f8102d4f2ef6057b5a8328d7eb7858f1ec4a2c8 (diff) | |
download | packages_apps_Settings-a4e0492c11fb7b02c9a536ea4935e649e97c8c2d.zip packages_apps_Settings-a4e0492c11fb7b02c9a536ea4935e649e97c8c2d.tar.gz packages_apps_Settings-a4e0492c11fb7b02c9a536ea4935e649e97c8c2d.tar.bz2 |
Merge "No auto soft keyboard when fp is in use" into mnc-dev
-rw-r--r-- | src/com/android/settings/ConfirmLockPassword.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/settings/ConfirmLockPassword.java b/src/com/android/settings/ConfirmLockPassword.java index 8ae2824..a4f658d 100644 --- a/src/com/android/settings/ConfirmLockPassword.java +++ b/src/com/android/settings/ConfirmLockPassword.java @@ -88,6 +88,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity { private CountDownTimer mCountdownTimer; private boolean mIsAlpha; private InputMethodManager mImm; + private boolean mUsingFingerprint = false; // required constructor for fragments public ConfirmLockPasswordFragment() { @@ -203,10 +204,21 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity { getActivity().finish(); } + @Override + public void onFingerprintIconVisibilityChanged(boolean visible) { + mUsingFingerprint = visible; + } + private void resetState() { mPasswordEntry.setEnabled(true); mPasswordEntryInputDisabler.setInputEnabled(true); - mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT); + if (shouldAutoShowSoftKeyboard()) { + mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT); + } + } + + private boolean shouldAutoShowSoftKeyboard() { + return mPasswordEntry.isEnabled() && !mUsingFingerprint; } public void onWindowFocusChanged(boolean hasFocus) { @@ -217,7 +229,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity { mPasswordEntry.post(new Runnable() { @Override public void run() { - if (mPasswordEntry.isEnabled()) { + if (shouldAutoShowSoftKeyboard()) { resetState(); return; } |