Merge "Mark title & subtitle focusable, set selected unless a11y active" into udc-d1-dev am: fad60a95fd am: da749c76fc am: 118688269a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24276367

Change-Id: Iaab5f5dd23c45c361af45e1d31a281768730f94c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/packages/SystemUI/res/layout/biometric_prompt_layout.xml b/packages/SystemUI/res/layout/biometric_prompt_layout.xml
index ecb0bfa..bea0e13 100644
--- a/packages/SystemUI/res/layout/biometric_prompt_layout.xml
+++ b/packages/SystemUI/res/layout/biometric_prompt_layout.xml
@@ -28,7 +28,6 @@
         android:singleLine="true"
         android:marqueeRepeatLimit="1"
         android:ellipsize="marquee"
-        android:importantForAccessibility="no"
         style="@style/TextAppearance.AuthCredential.Title"/>
 
     <TextView
@@ -39,7 +38,6 @@
         android:singleLine="true"
         android:marqueeRepeatLimit="1"
         android:ellipsize="marquee"
-        android:importantForAccessibility="no"
         style="@style/TextAppearance.AuthCredential.Subtitle"/>
 
     <TextView
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
index b68b921..7b78761 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
@@ -93,9 +93,11 @@
         val subtitleView = view.findViewById<TextView>(R.id.subtitle)
         val descriptionView = view.findViewById<TextView>(R.id.description)
 
-        // set selected for marquee
-        titleView.isSelected = true
-        subtitleView.isSelected = true
+        // set selected to enable marquee unless a screen reader is enabled
+        titleView.isSelected =
+            !accessibilityManager.isEnabled || !accessibilityManager.isTouchExplorationEnabled
+        subtitleView.isSelected =
+            !accessibilityManager.isEnabled || !accessibilityManager.isTouchExplorationEnabled
         descriptionView.movementMethod = ScrollingMovementMethod()
 
         val iconViewOverlay = view.findViewById<LottieAnimationView>(R.id.biometric_icon_overlay)