diff options
-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; } |