From 4fef3fac2c8f4d37334ce3b1fe05191fb81c1682 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Fri, 5 May 2023 16:21:32 +0800 Subject: [PATCH] Set the talkback focus to the header text when Stage is NeedToConfirm Should set the talkback focus to the header text when the "Draw your pattern again" page is shown. Bug: 275728120 Test: 1. enable talk back 2. Setup pattern lock 3. In "Draw your pattern again" page, make sure the talkback focus is set to the header view Change-Id: If99a950488039840e8486ebb634f0070a9403916 --- src/com/android/settings/password/ChooseLockPattern.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java index 707eebf394d..dc36220afef 100644 --- a/src/com/android/settings/password/ChooseLockPattern.java +++ b/src/com/android/settings/password/ChooseLockPattern.java @@ -798,7 +798,12 @@ public class ChooseLockPattern extends SettingsActivity { // If the stage changed, announce the header for accessibility. This // is a no-op when accessibility is disabled. if (previousStage != stage || announceAlways) { - mHeaderText.announceForAccessibility(mHeaderText.getText()); + if (stage == Stage.NeedToConfirm) { + // If the Stage is NeedToConfirm, move the a11y focus to the header. + mHeaderText.requestAccessibilityFocus(); + } else { + mHeaderText.announceForAccessibility(mHeaderText.getText()); + } } }