Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbf41783 authored by Charlie Anderson's avatar Charlie Anderson
Browse files

Asynchronously call snapToPage so Talkback correctly scrolls to added widget

Bug: 326269165
Test: locally tested via Talkback
Flag: N/A

Change-Id: I2be6e9758617e4eca18b3ea1ebed8189145c4108
parent d5e4455a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -405,7 +405,9 @@ public class LauncherAccessibilityDelegate extends BaseAccessibilityDelegate<Lau
            } else if (item instanceof PendingAddItemInfo) {
                PendingAddItemInfo info = (PendingAddItemInfo) item;
                Workspace<?> workspace = mContext.getWorkspace();
                workspace.snapToPage(workspace.getPageIndexForScreenId(screenId));
                workspace.post(
                        () -> workspace.snapToPage(workspace.getPageIndexForScreenId(screenId))
                );
                mContext.addPendingItem(info, LauncherSettings.Favorites.CONTAINER_DESKTOP,
                        screenId, coordinates, info.spanX, info.spanY);
            } else if (item instanceof WorkspaceItemInfo) {