Skip to content

Commit 72bba58

Browse files
committed
TextView not respecting "speak passwords" setting when adding before text to events.
1. If the speak passwords settings is on, the accessibility events emitted from a TextView should contain the text and before text of the source. The settings shows the users consent to put the source's text in the event. While the code that populates the current text in the accessibility event respects the setting, the one that populates the before text does not. As a result the fact that the user has typed a letter cannot be echoed by an accessibility service. bug:7468768 Change-Id: I7580c37936d742f42653315b2591e268a634d22b
1 parent 44c4bba commit 72bba58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/widget/TextView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8780,8 +8780,8 @@ public void beforeTextChanged(CharSequence buffer, int start,
87808780
+ " before=" + before + " after=" + after + ": " + buffer);
87818781

87828782
if (AccessibilityManager.getInstance(mContext).isEnabled()
8783-
&& !isPasswordInputType(getInputType())
8784-
&& !hasPasswordTransformationMethod()) {
8783+
&& ((!isPasswordInputType(getInputType()) && !hasPasswordTransformationMethod())
8784+
|| shouldSpeakPasswordsForAccessibility())) {
87858785
mBeforeText = buffer.toString();
87868786
}
87878787

0 commit comments

Comments
 (0)