Fix incorrect talkback announcement for app -> home
This change removes the talkback announcement for the background app LauncherState, which defaulted to "Recent apps". Flag: EXEMPT bug fix Fixes: 418854152 Test: attempted home/overview/quick switch gestures from home and app Change-Id: I1f390902dfddd2e8576743dbbddce65121690f14
This commit is contained in:
@@ -35,6 +35,7 @@ import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
import static com.android.launcher3.LauncherState.FLAG_SKIP_STATE_ANNOUNCEMENT;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.NO_OFFSET;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
@@ -671,6 +672,15 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setTitle(@NonNull LauncherState state) {
|
||||
if (state.hasFlag(FLAG_SKIP_STATE_ANNOUNCEMENT)) {
|
||||
// Prevent accessibility title update announcement
|
||||
getWindow().getAttributes().accessibilityTitle = getString(state.getTitle());
|
||||
}
|
||||
super.setTitle(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TouchController[] createTouchControllers() {
|
||||
NavigationMode mode = DisplayController.getNavigationMode(this);
|
||||
|
||||
@@ -35,7 +35,8 @@ import com.android.quickstep.views.RecentsView;
|
||||
public class BackgroundAppState extends OverviewState {
|
||||
|
||||
private static final int STATE_FLAGS = FLAG_DISABLE_RESTORE | FLAG_RECENTS_VIEW_VISIBLE
|
||||
| FLAG_WORKSPACE_INACCESSIBLE | FLAG_NON_INTERACTIVE | FLAG_CLOSE_POPUPS;
|
||||
| FLAG_WORKSPACE_INACCESSIBLE | FLAG_NON_INTERACTIVE | FLAG_CLOSE_POPUPS
|
||||
| FLAG_SKIP_STATE_ANNOUNCEMENT;
|
||||
|
||||
public BackgroundAppState(int id) {
|
||||
this(id, LAUNCHER_STATE_BACKGROUND);
|
||||
|
||||
Reference in New Issue
Block a user