Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5383d077 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Fix a couple of drag & drop crashes" into honeycomb

parents 9335f5b2 1fc014fd
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -935,15 +935,17 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        } break;

        case DragEvent.ACTION_DRAG_ENDED: {
            // If a child was notified about an ongoing drag, it's told that it's over
            // Release the bookkeeping now that the drag lifecycle has ended
            if (mDragNotifiedChildren != null) {
                for (View child : mDragNotifiedChildren) {
                    // If a child was notified about an ongoing drag, it's told that it's over
                    child.dispatchDragEvent(event);
                }

            // Release the bookkeeping now that the drag lifecycle has ended
                mDragNotifiedChildren.clear();
                mCurrentDrag.recycle();
                mCurrentDrag = null;
            }

            // We consider drag-ended to have been handled if one of our children
            // had offered to handle the drag.
+1 −0
Original line number Diff line number Diff line
@@ -2803,6 +2803,7 @@ public final class ViewRoot extends Handler implements ViewParent,

                // Report the drop result when we're done
                if (what == DragEvent.ACTION_DROP) {
                    mDragDescription = null;
                    try {
                        Log.i(TAG, "Reporting drop result: " + result);
                        sWindowSession.reportDropResult(mWindow, result);
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ public class WindowManagerService extends IWindowManager.Stub
        void broadcastDragStartedLw(final float touchX, final float touchY) {
            // Cache a base-class instance of the clip metadata so that parceling
            // works correctly in calling out to the apps.
            mDataDescription = mData.getDescription();
            mDataDescription = (mData != null) ? mData.getDescription() : null;
            mNotifiedWindows.clear();
            mDragInProgress = true;