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

Commit 69733178 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Making old apps passing null ClipData to startDrag work again.

This is for compatibility; see the bug.

Bug: 31865195
Test: manually rant an old app
Change-Id: If2f55ffd424b31f18610b96dd30bca87408e3df0
parent 463d85cd
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -20661,7 +20661,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            return false;
            return false;
        }
        }
        if (data != null) {
            data.prepareToLeaveProcess((flags & View.DRAG_FLAG_GLOBAL) != 0);
            data.prepareToLeaveProcess((flags & View.DRAG_FLAG_GLOBAL) != 0);
        }
        boolean okay = false;
        boolean okay = false;
+2 −2
Original line number Original line Diff line number Diff line
@@ -5551,8 +5551,8 @@ public final class ViewRootImpl implements ViewParent,
                // Remember who the current drag target is pre-dispatch
                // Remember who the current drag target is pre-dispatch
                final View prevDragView = mCurrentDragView;
                final View prevDragView = mCurrentDragView;


                if (what == DragEvent.ACTION_DROP) {
                if (what == DragEvent.ACTION_DROP && event.mClipData != null) {
                    event.getClipData().prepareToEnterProcess();
                    event.mClipData.prepareToEnterProcess();
                }
                }


                // Now dispatch the drag/drop event
                // Now dispatch the drag/drop event