From b48c1b4039211bf5f75f229a5e5948c41fcb13c1 Mon Sep 17 00:00:00 2001 From: felkachang Date: Tue, 10 Apr 2018 12:47:29 +0800 Subject: [PATCH] Fix the TalkBack say wrong sentence after sim unlock After sim unlock, Telephony manager return result is ready and the remainAttemp is 0. The remainAttemp zero will make the following process get the password error message in showDefaultMessage. So, the process should reset the mRemainingAttempts to be -1 after confirming the sim state is ready. To reset the mRemainingAttempts will make the showDefaultMessage not to trigger the wrong talkback. Bug: 72663742 Test: atest SystemUITests Change-Id: I1b9b14282f74b3f41932af73c65d67379b9ed916 --- .../src/com/android/keyguard/KeyguardSimPinView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java index c71c433bb0163..42c7a5680d114 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java @@ -78,6 +78,11 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView { } break; } + case READY: { + mRemainingAttempts = -1; + resetState(); + break; + } default: resetState(); }