From: Selim Cinek Date: Thu, 22 Jun 2017 22:24:11 +0000 (-0700) Subject: Fixed an accessibility issue with the pin view X-Git-Tag: android-x86-9.0-r1~1044^2~40^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8a72b06a26718cb8bdfd2ad6ae31623b60911f39;p=android-x86%2Fframeworks-base.git Fixed an accessibility issue with the pin view We were sending an accessibility event even if there were no characters left, leading to an additional "bullet deleted" notice. Test: input pin, delte pins one bye one, observe no talkback spoken anymore at the end Bug: 62714260 Change-Id: Iee751e31f702f4b0dc6d5a15d31d58e71bfa797e --- diff --git a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java index c43820d5a8fc..f5c82a778eb6 100644 --- a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java +++ b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java @@ -28,10 +28,8 @@ import android.graphics.Rect; import android.graphics.Typeface; import android.os.PowerManager; import android.os.SystemClock; -import android.os.UserHandle; import android.provider.Settings; import android.text.InputType; -import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; @@ -248,9 +246,9 @@ public class PasswordTextView extends View { mText = mText.substring(0, length - 1); CharState charState = mTextChars.get(length - 1); charState.startRemoveAnimation(0, 0); + sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length() - 1, 1, 0); } userActivity(); - sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length() - 1, 1, 0); } public String getText() {