No auto soft keyboard when fp is in use
Bug:20861013 Change-Id: Ia788e4c5dbabef374d08c7cb063ef2c07bbdb078
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user