Fixes issue with wrong pin input message not being shown

This chain of calls lead us to reset the primary auth error message because we assume that the user has started entering their primary auth again.

KeyguardPinBasedInputView#resetPasswordText -> PasswordTextView#reset -> PasswordTextView#userActivity() -> UserActivityListener#onUserActivity -> KeyguardAbsKeyInputViewController#onUserInput -> KeyguardSecurityCallback#onUserInput -> BouncerMessageInteractor#onPrimaryBouncerUserInput()

This fix invokes the resetPasswordText before we invoke `reportUnlockAttempt` so that the primary auth error message doesn't get cleared out


Fixes: 293475939
Test: verified manually
Change-Id: Ie7c144bf96cc542d9aae11c255394bd9ca10f2a0
This commit is contained in:
Chandru S
2023-08-01 17:35:21 -07:00
parent d8555b693a
commit 41c58ce8ec

View File

@@ -178,6 +178,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
getKeyguardSecurityCallback().dismiss(true, userId, getSecurityMode());
}
} else {
mView.resetPasswordText(true /* animate */, false /* announce deletion if no match */);
if (isValidPassword) {
getKeyguardSecurityCallback().reportUnlockAttempt(userId, false, timeoutMs);
if (timeoutMs > 0) {
@@ -186,7 +187,6 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
handleAttemptLockout(deadline);
}
}
mView.resetPasswordText(true /* animate */, false /* announce deletion if no match */);
if (timeoutMs == 0) {
mMessageAreaController.setMessage(mView.getWrongPasswordStringId());
}