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

Commit d209f9e4 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Fixing crash upon cancellation of an accessible drag." into ub-launcher3-master

parents 3759d1bc de1e67c3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -878,6 +878,9 @@ public class Workspace extends PagedView
            }
        }

        LauncherAccessibilityDelegate delegate =
                LauncherAppState.getInstance().getAccessibilityDelegate();

        // We enforce at least one page to add new items to. In the case that we remove the last
        // such screen, we convert the last screen to the empty screen
        int minScreens = 1 + numCustomPages();
@@ -892,6 +895,11 @@ public class Workspace extends PagedView
                if (indexOfChild(cl) < currentPage) {
                    pageShift++;
                }

                if (delegate != null && delegate.isInAccessibleDrag()) {
                    cl.enableAccessibleDrag(false, CellLayout.WORKSPACE_ACCESSIBILITY_DRAG);
                }

                removeView(cl);
            } else {
                // if this is the last non-custom content screen, convert it to the empty screen