summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2010-07-16 22:49:32 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-16 22:49:32 (GMT)
commit5999f114b94921f6a3605b62177471b503191708 (patch)
tree974cfc881950e3d7f0965a7ba2a015c0854d1729 /src
parent8f86ddcb90063a56c25c9c782316574bc4e5dd93 (diff)
parentc1701ad4b2f7e8edf03438df26e1c2161d034847 (diff)
downloadandroid_packages_apps_Trebuchet-5999f114b94921f6a3605b62177471b503191708.zip
android_packages_apps_Trebuchet-5999f114b94921f6a3605b62177471b503191708.tar.gz
android_packages_apps_Trebuchet-5999f114b94921f6a3605b62177471b503191708.tar.bz2
Merge "Fix null pointer when dragging outside of workspace."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/DragController.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index f2fad9a..0130ba9 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -394,13 +394,14 @@ public class DragController {
// Drop on someone?
final int[] coordinates = mCoordinatesTemp;
DropTarget dropTarget = findDropTarget(screenX, screenY, coordinates);
- DropTarget delegate = dropTarget.getDropTargetDelegate(
- mDragSource, coordinates[0], coordinates[1],
- (int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
- if (delegate != null) {
- dropTarget = delegate;
- }
if (dropTarget != null) {
+ DropTarget delegate = dropTarget.getDropTargetDelegate(
+ mDragSource, coordinates[0], coordinates[1],
+ (int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
+ if (delegate != null) {
+ dropTarget = delegate;
+ }
+
if (mLastDropTarget == dropTarget) {
dropTarget.onDragOver(mDragSource, coordinates[0], coordinates[1],
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);