Remove content description for fingerprint dialog error text
Currently, the fingerprint dialog shown for API < 28 sets a content
description on the error message TextView, causing that to be read aloud
by TalkBack instead of the actual error message. This commit fixes the
issue by simply removing the content description for the error TextView
so that it doesn't override the visible text for accessibility.
Test: Run androidx biometric demo on Pixel 2XL API 26, launch the
fingerprint dialog with TalkBack enabled, and set focus on "Touch the
fingerprint sensor" view. Verify that TalkBack now reads aloud "Touch
the fingerprint sensor" instead of "Help message area". Also trigger
other errors such as "Not recognized" and verify that these are also
read aloud by TalkBack as they occur.
Fixes: 123572331
Change-Id: I11b351e1ab88c828e2114a357850880759e083be
diff --git a/biometric/res/layout/fingerprint_dialog_layout.xml b/biometric/res/layout/fingerprint_dialog_layout.xml
index a29c1a9..ce474cf 100644
--- a/biometric/res/layout/fingerprint_dialog_layout.xml
+++ b/biometric/res/layout/fingerprint_dialog_layout.xml
@@ -63,7 +63,6 @@
android:gravity="center_horizontal"
android:accessibilityLiveRegion="polite"
android:text="@string/fingerprint_dialog_touch_sensor"
- android:contentDescription="@string/accessibility_fingerprint_dialog_help_area"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>