summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/DragController.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/DragController.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/DragController.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/cyanogenmod/trebuchet/DragController.java b/src/com/cyanogenmod/trebuchet/DragController.java
index cdb5060f9..ba4178038 100644
--- a/src/com/cyanogenmod/trebuchet/DragController.java
+++ b/src/com/cyanogenmod/trebuchet/DragController.java
@@ -34,6 +34,7 @@ import android.view.ViewConfiguration;
import android.view.inputmethod.InputMethodManager;
import com.cyanogenmod.trebuchet.R;
+import com.cyanogenmod.trebuchet.DropTarget.DragObject;
import java.util.ArrayList;
@@ -442,7 +443,7 @@ public class DragController {
case MotionEvent.ACTION_UP:
mLastTouchUpTime = System.currentTimeMillis();
if (mDragging) {
- PointF vec = isFlingingToDelete(mDragObject.dragSource);
+ PointF vec = isFlingingToDelete(mDragObject);
if (vec != null) {
dropOnFlingToDeleteTarget(dragLayerX, dragLayerY, vec);
} else {
@@ -584,7 +585,7 @@ public class DragController {
mHandler.removeCallbacks(mScrollRunnable);
if (mDragging) {
- PointF vec = isFlingingToDelete(mDragObject.dragSource);
+ PointF vec = isFlingingToDelete(mDragObject);
if (vec != null) {
dropOnFlingToDeleteTarget(dragLayerX, dragLayerY, vec);
} else {
@@ -607,9 +608,10 @@ public class DragController {
*
* @return the vector at which the item was flung, or null if no fling was detected.
*/
- private PointF isFlingingToDelete(DragSource source) {
+ private PointF isFlingingToDelete(DragObject object) {
if (mFlingToDeleteDropTarget == null) return null;
- if (!source.supportsFlingToDelete()) return null;
+ if (!object.dragSource.supportsFlingToDelete()) return null;
+ if (object.dragInfo instanceof AllAppsButtonInfo) return null;
ViewConfiguration config = ViewConfiguration.get(mLauncher);
mVelocityTracker.computeCurrentVelocity(1000, config.getScaledMaximumFlingVelocity());