OSDN Git Service

Fix 2257802 - Screen unresponsive when you get a call while moving the shortcuts...
authorJoe Onorato <joeo@android.com>
Thu, 12 Nov 2009 21:47:09 +0000 (13:47 -0800)
committerJoe Onorato <joeo@android.com>
Thu, 12 Nov 2009 21:49:09 +0000 (13:49 -0800)
src/com/android/launcher2/DragController.java
src/com/android/launcher2/Launcher.java

index 1655cb8..590ca69 100644 (file)
@@ -279,6 +279,13 @@ public class DragController {
         return mDragging;
     }
 
+    /**
+     * Stop dragging without dropping.
+     */
+    public void cancelDrag() {
+        endDrag();
+    }
+
     private void endDrag() {
         if (mDragging) {
             mDragging = false;
@@ -426,7 +433,7 @@ public class DragController {
 
             break;
         case MotionEvent.ACTION_CANCEL:
-            endDrag();
+            cancelDrag();
         }
 
         return true;
index 0150af2..6ca4624 100644 (file)
@@ -437,6 +437,7 @@ public final class Launcher extends Activity
         super.onPause();
         dismissPreview(mPreviousView);
         dismissPreview(mNextView);
+        mDragController.cancelDrag();
     }
 
     @Override