summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/DragController.java
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2011-03-02 16:20:29 -0800
committerPatrick Dubroy <dubroy@google.com>2011-03-02 16:20:29 -0800
commitbd361f7a854112ba8217213ac15131600726a90b (patch)
tree2f3878467b76a80790eed214e422e086f29e5fae /src/com/android/launcher2/DragController.java
parentda6823e42ff8c9a0795203541a1cc55008ccad5a (diff)
downloadandroid_packages_apps_Trebuchet-bd361f7a854112ba8217213ac15131600726a90b.tar.gz
android_packages_apps_Trebuchet-bd361f7a854112ba8217213ac15131600726a90b.tar.bz2
android_packages_apps_Trebuchet-bd361f7a854112ba8217213ac15131600726a90b.zip
Revert "Fix 3377113: Mini homescreen outline wrong color"
This reverts commit ba1ca8cf7ae52f730de9a8d543f8f0d484e76c32.
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r--src/com/android/launcher2/DragController.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index 331ebd635..e54669718 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -557,9 +557,6 @@ public class DragController {
handleMoveEvent(screenX, screenY);
break;
case MotionEvent.ACTION_UP:
- // Ensure that we've processed a move event at the current pointer location.
- handleMoveEvent(screenX, screenY);
-
mHandler.removeCallbacks(mScrollRunnable);
if (mDragging) {
drop(screenX, screenY);
@@ -574,11 +571,10 @@ public class DragController {
return true;
}
- private void drop(float x, float y) {
+ private boolean drop(float x, float y) {
final int[] coordinates = mCoordinatesTemp;
DropTarget dropTarget = findDropTarget((int) x, (int) y, coordinates);
- boolean accepted = false;
if (dropTarget != null) {
dropTarget.onDragExit(mDragSource, coordinates[0], coordinates[1],
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
@@ -586,10 +582,16 @@ public class DragController {
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo)) {
dropTarget.onDrop(mDragSource, coordinates[0], coordinates[1],
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
- accepted = true;
+ mDragSource.onDropCompleted((View) dropTarget, mDragInfo, true);
+ return true;
+ } else {
+ mDragSource.onDropCompleted((View) dropTarget, mDragInfo, false);
+ return true;
}
+ } else {
+ mDragSource.onDropCompleted(null, mDragInfo, false);
}
- mDragSource.onDropCompleted(null, mDragInfo, accepted);
+ return false;
}
private DropTarget findDropTarget(int x, int y, int[] dropCoordinates) {