summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop/DragController.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/dragndrop/DragController.java')
-rw-r--r--src/com/android/launcher3/dragndrop/DragController.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index dcdf5d616..d845ad20c 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -41,6 +41,7 @@ import com.android.launcher3.DropTarget;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.testing.TestProtocol;
@@ -429,6 +430,11 @@ public class DragController implements DragDriver.EventListener, TouchController
return false;
}
+ if (!Utilities.isWorkspaceEditAllowed(mLauncher.getApplicationContext())) {
+ cancelDrag();
+ return false;
+ }
+
// Update the velocity tracker
mFlingToDeleteHelper.recordMotionEvent(ev);