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

Commit 854d3f2e authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Enable StrictMode.detectFileUriExposure() for drag and drop

Call ClipData.prepareToLeaveProcess/prepareToEnterProcess
at appropriate moments to check for StrictMode violations.

Bug: 30772435
Change-Id: I5c84c6c7b3d04094563623156616390d3df6879e
parent 495f3f5d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20674,6 +20674,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            Log.w(VIEW_LOG_TAG, "startDragAndDrop called on a detached view.");
            return false;
        }
        data.prepareToLeaveProcess((flags & View.DRAG_FLAG_GLOBAL) != 0);
        boolean okay = false;
        Point shadowSize = new Point();
+4 −0
Original line number Diff line number Diff line
@@ -5539,6 +5539,10 @@ public final class ViewRootImpl implements ViewParent,
                // Remember who the current drag target is pre-dispatch
                final View prevDragView = mCurrentDragView;

                if (what == DragEvent.ACTION_DROP) {
                    event.getClipData().prepareToEnterProcess();
                }

                // Now dispatch the drag/drop event
                boolean result = mView.dispatchDragEvent(event);