From 3cb889fc781d66f003017beb09f8b8c126f54d27 Mon Sep 17 00:00:00 2001 From: jasonwshsu Date: Mon, 5 Jul 2021 10:07:49 +0800 Subject: [PATCH] Fix accessibility button footer preference did not announced correct by TalkBack Root Cause: Description would be altered after displayPreference(), but getSummary() would be called after it. Solution: Update title before displayPreference(), then it could be set correctly. Fix: 192738520 Test: atest AccessibilityButtonFooterPreferenceControllerTest Change-Id: I068994fca8202b166fedf43f9d9657b0c1a64c4e --- res/xml/accessibility_button_settings.xml | 1 + ...ilityButtonFooterPreferenceController.java | 17 ++++++++--- ...yButtonFooterPreferenceControllerTest.java | 30 +++++++++---------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/res/xml/accessibility_button_settings.xml b/res/xml/accessibility_button_settings.xml index 78d13ab1a8d..02b1c7d4693 100644 --- a/res/xml/accessibility_button_settings.xml +++ b/res/xml/accessibility_button_settings.xml @@ -61,6 +61,7 @@