Loading src/com/android/launcher3/Workspace.java +8 −5 Original line number Diff line number Diff line Loading @@ -1777,7 +1777,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> boolean droppedOnOriginalCell = false; int snapScreen = -1; boolean snappedToNewPage = false; boolean resizeOnDrop = false; Runnable onCompleteRunnable = null; if (d.dragSource != this || mDragInfo == null) { Loading Loading @@ -1859,11 +1859,14 @@ public class Workspace extends PagedView<WorkspacePageIndicator> } if (foundCell) { if (getScreenIdForPageIndex(mCurrentPage) != screenId && !hasMovedIntoHotseat) { snapScreen = getPageIndexForScreenId(screenId); int targetScreenIndex = getPageIndexForScreenId(screenId); int snapScreen = getLeftmostVisiblePageForIndex(targetScreenIndex); // On large screen devices two pages can be shown at the same time, and snap // isn't needed if the source and target screens appear at the same time if (snapScreen != mCurrentPage && !hasMovedIntoHotseat) { snapToPage(snapScreen); snappedToNewPage = true; } final ItemInfo info = (ItemInfo) cell.getTag(); if (hasMovedLayouts) { // Reparent the view Loading Loading @@ -1955,7 +1958,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> ANIMATE_INTO_POSITION_AND_DISAPPEAR; animateWidgetDrop(info, parent, d.dragView, null, animationType, cell, false); } else { int duration = snapScreen < 0 ? -1 : ADJACENT_SCREEN_DROP_DURATION; int duration = snappedToNewPage ? ADJACENT_SCREEN_DROP_DURATION : -1; mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, cell, duration, this); } Loading src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java +2 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ public class LauncherAccessibilityDelegate extends AccessibilityDelegate impleme private boolean itemSupportsAccessibleDrag(ItemInfo item) { if (item instanceof WorkspaceItemInfo) { // Support the action unless the item is in a context menu. return item.screenId >= 0 && item.container != Favorites.CONTAINER_HOTSEAT_PREDICTION; return (item.screenId >= 0 || item.screenId == Workspace.LEFT_PANEL_ID) && item.container != Favorites.CONTAINER_HOTSEAT_PREDICTION; } return (item instanceof LauncherAppWidgetInfo) || (item instanceof FolderInfo); Loading Loading
src/com/android/launcher3/Workspace.java +8 −5 Original line number Diff line number Diff line Loading @@ -1777,7 +1777,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> boolean droppedOnOriginalCell = false; int snapScreen = -1; boolean snappedToNewPage = false; boolean resizeOnDrop = false; Runnable onCompleteRunnable = null; if (d.dragSource != this || mDragInfo == null) { Loading Loading @@ -1859,11 +1859,14 @@ public class Workspace extends PagedView<WorkspacePageIndicator> } if (foundCell) { if (getScreenIdForPageIndex(mCurrentPage) != screenId && !hasMovedIntoHotseat) { snapScreen = getPageIndexForScreenId(screenId); int targetScreenIndex = getPageIndexForScreenId(screenId); int snapScreen = getLeftmostVisiblePageForIndex(targetScreenIndex); // On large screen devices two pages can be shown at the same time, and snap // isn't needed if the source and target screens appear at the same time if (snapScreen != mCurrentPage && !hasMovedIntoHotseat) { snapToPage(snapScreen); snappedToNewPage = true; } final ItemInfo info = (ItemInfo) cell.getTag(); if (hasMovedLayouts) { // Reparent the view Loading Loading @@ -1955,7 +1958,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator> ANIMATE_INTO_POSITION_AND_DISAPPEAR; animateWidgetDrop(info, parent, d.dragView, null, animationType, cell, false); } else { int duration = snapScreen < 0 ? -1 : ADJACENT_SCREEN_DROP_DURATION; int duration = snappedToNewPage ? ADJACENT_SCREEN_DROP_DURATION : -1; mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, cell, duration, this); } Loading
src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java +2 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ public class LauncherAccessibilityDelegate extends AccessibilityDelegate impleme private boolean itemSupportsAccessibleDrag(ItemInfo item) { if (item instanceof WorkspaceItemInfo) { // Support the action unless the item is in a context menu. return item.screenId >= 0 && item.container != Favorites.CONTAINER_HOTSEAT_PREDICTION; return (item.screenId >= 0 || item.screenId == Workspace.LEFT_PANEL_ID) && item.container != Favorites.CONTAINER_HOTSEAT_PREDICTION; } return (item instanceof LauncherAppWidgetInfo) || (item instanceof FolderInfo); Loading