Fix BiometricPrompt double TalkBack announcement

Fixes an issue that caused the content description for the
BiometricPrompt background cancellation target to be read aloud twice by
TalkBack when the prompt was displayed.

Test: Manual:
1. Enable Talkback
2. Install the CtsVerifier apk
3. Launch app and select Biometric Tests > 4a: Cipher, Credential
4. Select "time-based key with biometric" to launch prompt

Before: TalkBack reads "Tap to cancel authentication. Tap to cancel
authentication, button."

After: TalkBack reads "SystemUI. Tap to cancel authentication, button."

Fixes: 155042588
Change-Id: I93f7380d87213aba8f1e1030510b84170ae9c2f7
This commit is contained in:
Curtis Belmonte
2020-05-08 13:40:31 -07:00
parent 75aeabdd8a
commit bca44547d0
2 changed files with 1 additions and 1 deletions

View File

@@ -23,7 +23,6 @@
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:accessibilityLiveRegion="polite"
android:background="@color/biometric_dialog_dim_color"
android:contentDescription="@string/biometric_dialog_empty_space_description"/>

View File

@@ -300,6 +300,7 @@ public class AuthContainerView extends LinearLayout
return true;
});
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
setFocusableInTouchMode(true);
requestFocus();
}