From bca44547d0ec6c31247a9a49d1606a84d785937e Mon Sep 17 00:00:00 2001 From: Curtis Belmonte Date: Fri, 8 May 2020 13:40:31 -0700 Subject: [PATCH] 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 --- packages/SystemUI/res/layout/auth_container_view.xml | 1 - .../src/com/android/systemui/biometrics/AuthContainerView.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/res/layout/auth_container_view.xml b/packages/SystemUI/res/layout/auth_container_view.xml index 63eccda5d3098..3db01a4e7f3aa 100644 --- a/packages/SystemUI/res/layout/auth_container_view.xml +++ b/packages/SystemUI/res/layout/auth_container_view.xml @@ -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"/> diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java index b736b4df8abf3..b0051d00e0b5c 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -300,6 +300,7 @@ public class AuthContainerView extends LinearLayout return true; }); + setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); setFocusableInTouchMode(true); requestFocus(); }