OSDN Git Service

Attempt to fix crash on workspace drag and drop on certain JB devices
authorAdam Cohen <adamcohen@google.com>
Fri, 4 Apr 2014 23:36:21 +0000 (16:36 -0700)
committerAdam Cohen <adamcohen@google.com>
Fri, 4 Apr 2014 23:53:02 +0000 (16:53 -0700)
issue 13801679

Change-Id: I4769220ddeab566a869050b20d6064809c70bc19

src/com/android/launcher3/DragLayer.java

index 7ccbe6b..bbf8c8c 100644 (file)
@@ -736,7 +736,13 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
             mDropAnim.cancel();
         }
         if (mDropView != null) {
-            mDragController.onDeferredEndDrag(mDropView);
+            final DragView dropView = mDropView;
+            post(new Runnable() {
+                @Override
+                public void run() {
+                    mDragController.onDeferredEndDrag(dropView);
+                }
+            });
         }
         mDropView = null;
         invalidate();