Fix Talkback wrong label announced going from App to Overview

To fix the incorrect title information being spoken after a transition state ends, a new function named getTitle is introduced in the LauncherState. This function provides the correct title for the transition state. The default accessibility label is set to R.string.home_screen. All Apps and Overview states override the getTitle function to ensure the correct accessibility label for their respective states.

Fix: 265892510
Flag: EXEMPT bugfix
Test: Manual with Talkback. With Talkback enabled, navigate from App to Overview.
Change-Id: I96b820f310f8b778a149709bca687a5912386246
This commit is contained in:
Jordan Silva
2024-05-29 14:40:46 +01:00
parent 1d9f23b1ad
commit 8181dfdf92
6 changed files with 24 additions and 5 deletions

View File

@@ -52,6 +52,11 @@ public class AllAppsState extends LauncherState {
return launcher.getString(R.string.all_apps_button_label);
}
@Override
public int getTitle() {
return R.string.all_apps_label;
}
@Override
public int getVisibleElements(Launcher launcher) {
return ALL_APPS_CONTENT;