summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiyuan Xia <xiyuan@google.com>2015-05-26 21:05:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-26 21:05:27 +0000
commita4e0492c11fb7b02c9a536ea4935e649e97c8c2d (patch)
tree39c6af5647e37468bd4e2c3139b095be7965e2a4
parent44fb627cf67dfa3b9c2c625fd39ca8e9a9829813 (diff)
parent4f8102d4f2ef6057b5a8328d7eb7858f1ec4a2c8 (diff)
downloadpackages_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.java16
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;
}