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

Commit c3debf29 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Start respecting View.DRAG_FLAG_GLOBAL flag.

Respect flags passed to startDrag (they used to be ignored).
Allow global drag&drop for text views.

Bug: 19548858
Change-Id: I981cfd617ebc6f5f2d59ebded798c22dc4920d38
parent 78d9de97
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -995,7 +995,8 @@ public class Editor {
                CharSequence selectedText = mTextView.getTransformedText(start, end);
                ClipData data = ClipData.newPlainText(null, selectedText);
                DragLocalState localState = new DragLocalState(mTextView, start, end);
                mTextView.startDrag(data, getTextThumbnailBuilder(selectedText), localState, 0);
                mTextView.startDrag(data, getTextThumbnailBuilder(selectedText), localState,
                        View.DRAG_FLAG_GLOBAL);
                stopSelectionActionMode();
            } else {
                stopSelectionActionMode();
+1 −1
Original line number Diff line number Diff line
@@ -7383,7 +7383,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        outSurface.copyFrom(surface);
                        final IBinder winBinder = window.asBinder();
                        token = new Binder();
                        mDragState = new DragState(this, token, surface, /*flags*/ 0, winBinder);
                        mDragState = new DragState(this, token, surface, flags, winBinder);
                        token = mDragState.mToken = new Binder();

                        // 5 second timeout for this window to actually begin the drag