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

Commit d5f58da1 authored by Yorke Lee's avatar Yorke Lee
Browse files

Fix drag events transfering through dialpad

Ignore drag events sent by the dialpad's EditText

Bug: 17375188
Change-Id: Ia2f83ee1c1b2f59a54bd226c44f28609d2bc195e
parent 03610993
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -149,6 +149,11 @@ public class PhoneFavoriteListView extends GridView implements OnDragDropListene
        final int eY = (int) event.getY();
        switch (action) {
            case DragEvent.ACTION_DRAG_STARTED: {
                if (PhoneFavoriteTileView.EMPTY_CLIP_DATA != event.getClipData()) {
                    // Ignore any drag events that were not propagated by long pressing
                    // on a {@link PhoneFavoriteTileView}
                    return false;
                }
                if (!mDragDropController.handleDragStarted(eX, eY)) {
                    return false;
                }
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView {

    // Dummy clip data object that is attached to drag shadows so that text views
    // don't crash with an NPE if the drag shadow is released in their bounds
    private static final ClipData EMPTY_CLIP_DATA = ClipData.newPlainText("", "");
    static final ClipData EMPTY_CLIP_DATA = ClipData.newPlainText("", "");

    public PhoneFavoriteTileView(Context context, AttributeSet attrs) {
        super(context, attrs);