Merge "Fix IME window pops up when unlock keyguard with fingerprint"

This commit is contained in:
TreeHugger Robot
2019-01-16 04:06:38 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
protected View mEcaView;
protected boolean mEnableHaptics;
private boolean mDismissing;
protected boolean mResumed;
private CountDownTimer mCountdownTimer = null;
// To avoid accidental lockout due to events while the device in in the pocket, ignore
@@ -263,6 +264,8 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
@Override
public void onPause() {
mResumed = false;
if (mCountdownTimer != null) {
mCountdownTimer.cancel();
mCountdownTimer = null;
@@ -276,6 +279,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
@Override
public void onResume(int reason) {
mResumed = true;
}
@Override

View File

@@ -81,6 +81,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
protected void resetState() {
mSecurityMessageDisplay.setMessage("");
final boolean wasDisabled = mPasswordEntry.isEnabled();
// Don't set enabled password entry & showSoftInput when PasswordEntry is invisible or in
// pausing stage.
if (!mResumed || !mPasswordEntry.isVisibleToUser()) {
return;
}
setPasswordEntryEnabled(true);
setPasswordEntryInputEnabled(true);
if (wasDisabled) {