Loading src/com/android/launcher3/dragndrop/DragLayer.java +22 −19 Original line number Diff line number Diff line Loading @@ -230,6 +230,28 @@ public class DragLayer extends InsettableFrameLayout { } } // Remove the shortcuts container when touching outside of it. DeepShortcutsContainer deepShortcutsContainer = (DeepShortcutsContainer) findViewById(R.id.deep_shortcuts_container); if (deepShortcutsContainer != null) { if (isEventOverView(deepShortcutsContainer, ev)) { // Let the container handle the event. return false; } else { if (isInAccessibleDrag()) { // Do not close the container if in drag and drop. if (!isEventOverDropTargetBar(ev)) { return true; } } else { removeView(deepShortcutsContainer); // We let touches on the original icon go through so that users can launch // the app with one tap if they don't find a shortcut they want. return !isEventOverView(deepShortcutsContainer.getDeferredDragIcon(), ev); } } } Folder currentFolder = mLauncher.getWorkspace().getOpenFolder(); if (currentFolder != null && intercept) { if (currentFolder.isEditingName()) { Loading @@ -251,25 +273,6 @@ public class DragLayer extends InsettableFrameLayout { } } } // Remove the shortcuts container when touching outside of it. DeepShortcutsContainer deepShortcutsContainer = (DeepShortcutsContainer) findViewById(R.id.deep_shortcuts_container); if (deepShortcutsContainer != null) { if (!isEventOverView(deepShortcutsContainer, ev)) { if (isInAccessibleDrag()) { // Do not close the container if in drag and drop. if (!isEventOverDropTargetBar(ev)) { return true; } } else { removeView(deepShortcutsContainer); // We let touches on the original icon go through so that users can launch // the app with one tap if they don't find a shortcut they want. return !isEventOverView(deepShortcutsContainer.getDeferredDragIcon(), ev); } } } return false; } Loading src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java +2 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,8 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnClic mLauncher.getDragLayer().setController(mLauncher.getDragController()); mLauncher.getWorkspace().beginDragShared(v, mIconLastTouchPos, this, false); ((DragLayer) getParent()).removeView(this); // TODO: support dragging from within folder without having to close it mLauncher.closeFolder(); return false; } Loading Loading
src/com/android/launcher3/dragndrop/DragLayer.java +22 −19 Original line number Diff line number Diff line Loading @@ -230,6 +230,28 @@ public class DragLayer extends InsettableFrameLayout { } } // Remove the shortcuts container when touching outside of it. DeepShortcutsContainer deepShortcutsContainer = (DeepShortcutsContainer) findViewById(R.id.deep_shortcuts_container); if (deepShortcutsContainer != null) { if (isEventOverView(deepShortcutsContainer, ev)) { // Let the container handle the event. return false; } else { if (isInAccessibleDrag()) { // Do not close the container if in drag and drop. if (!isEventOverDropTargetBar(ev)) { return true; } } else { removeView(deepShortcutsContainer); // We let touches on the original icon go through so that users can launch // the app with one tap if they don't find a shortcut they want. return !isEventOverView(deepShortcutsContainer.getDeferredDragIcon(), ev); } } } Folder currentFolder = mLauncher.getWorkspace().getOpenFolder(); if (currentFolder != null && intercept) { if (currentFolder.isEditingName()) { Loading @@ -251,25 +273,6 @@ public class DragLayer extends InsettableFrameLayout { } } } // Remove the shortcuts container when touching outside of it. DeepShortcutsContainer deepShortcutsContainer = (DeepShortcutsContainer) findViewById(R.id.deep_shortcuts_container); if (deepShortcutsContainer != null) { if (!isEventOverView(deepShortcutsContainer, ev)) { if (isInAccessibleDrag()) { // Do not close the container if in drag and drop. if (!isEventOverDropTargetBar(ev)) { return true; } } else { removeView(deepShortcutsContainer); // We let touches on the original icon go through so that users can launch // the app with one tap if they don't find a shortcut they want. return !isEventOverView(deepShortcutsContainer.getDeferredDragIcon(), ev); } } } return false; } Loading
src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java +2 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,8 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnClic mLauncher.getDragLayer().setController(mLauncher.getDragController()); mLauncher.getWorkspace().beginDragShared(v, mIconLastTouchPos, this, false); ((DragLayer) getParent()).removeView(this); // TODO: support dragging from within folder without having to close it mLauncher.closeFolder(); return false; } Loading