From e98f04b9365701529e3a8f83f4d15809411b971e Mon Sep 17 00:00:00 2001 From: lumark Date: Tue, 24 Sep 2019 17:13:35 +0800 Subject: [PATCH] Fix Password entry won't enable when lockout finished in screen-off CL [1] introduced a check to see if password entry need to show soft-keyboard for fixing keyboard popup unexpected issue. But it shouldn't need to block the password entry re-enable when lockout finished in screen-off state. Move the original check right before the showSoftInput to fix the case. [1]: I3c43d09d4206c48f1afcd8dad79e7978337f1b7d Fix: 128563724 Bug: 112811602 Test: manual as issue steps: 1). Set up Password as screen lock. 2). Enter lock screen. 3). Input wrong password 5 times, and it will show "Try again in 30 seconds" message. 4). Wait device screen off auto, and then wait 30 seconds. 5). Screen on device. 6). Swipe up and then try to input password to unlock, expected password entry should enabled and can invoke soft-keyboard. Change-Id: I3e0eeffdb3536588c0e039c8fbeaf8833e7af06e --- .../SystemUI/src/com/android/keyguard/KeyguardPasswordView.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java index eaaa3ed78654..e3ac0f684e44 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java @@ -86,13 +86,12 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView mSecurityMessageDisplay.setMessage(""); } final boolean wasDisabled = mPasswordEntry.isEnabled(); - // Don't set enabled password entry & showSoftInput when PasswordEntry is invisible or in - // pausing stage. + setPasswordEntryEnabled(true); + setPasswordEntryInputEnabled(true); + // Don't call showSoftInput when PasswordEntry is invisible or in pausing stage. if (!mResumed || !mPasswordEntry.isVisibleToUser()) { return; } - setPasswordEntryEnabled(true); - setPasswordEntryInputEnabled(true); if (wasDisabled) { mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT); } -- 2.11.0