Allow fling gesture while dragging from AllApps to dismiss drag.
Change-Id: I5eea14336579a1374aded63dda9ad1a33e8b8d4a
diff --git a/src/com/android/launcher2/DragSource.java b/src/com/android/launcher2/DragSource.java
index a654b93..5440477 100644
--- a/src/com/android/launcher2/DragSource.java
+++ b/src/com/android/launcher2/DragSource.java
@@ -25,6 +25,21 @@
*
*/
public interface DragSource {
+ /**
+ * @return whether items dragged from this source supports
+ */
boolean supportsFlingToDelete();
- void onDropCompleted(View target, DragObject d, boolean success);
+
+ /**
+ * A callback specifically made back to the source after an item from this source has been flung
+ * to be deleted on a DropTarget. In such a situation, this method will be called after
+ * onDropCompleted, and more importantly, after the fling animation has completed.
+ */
+ void onFlingToDeleteCompleted();
+
+ /**
+ * A callback made back to the source after an item from this source has been dropped on a
+ * DropTarget.
+ */
+ void onDropCompleted(View target, DragObject d, boolean isFlingToDelete, boolean success);
}