Match displayed instruction with voiceover text.
When users are using TalkBack, the text being read aloud did not match
the text displayed on the screen. This change fixes that in accordance
to the accessibility testing principles by changing the text spoken
aloud.
Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL
Fix: 274996517
Test: Manually went through both versions of the tutorial using talkback
and without using it. Ensured the spoken text matched the displayed
text
Change-Id: I896f2c09bd220615722777c73935f70c946715b2
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index 084f8c1..5ec92a6 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -412,10 +412,12 @@
}
mFeedbackTitleView.setText(titleResId);
- mFeedbackSubtitleView.setText(spokenSubtitleResId == NO_ID
- ? mContext.getText(subtitleResId)
- : Utilities.wrapForTts(
- mContext.getText(subtitleResId), mContext.getString(spokenSubtitleResId)));
+ mFeedbackSubtitleView.setText(
+ ENABLE_NEW_GESTURE_NAV_TUTORIAL.get() || spokenSubtitleResId == NO_ID
+ ? mContext.getText(subtitleResId)
+ : Utilities.wrapForTts(
+ mContext.getText(subtitleResId),
+ mContext.getString(spokenSubtitleResId)));
if (isGestureSuccessful) {
if (mTutorialFragment.isAtFinalStep()) {
showActionButton();