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

Commit f08f8ba8 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Fix drag events transfering through dialpad" into lmp-dev

parents 29ae4ae7 d5f58da1
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,11 @@ public class PhoneFavoriteListView extends GridView implements OnDragDropListene
        final int eY = (int) event.getY();
        final int eY = (int) event.getY();
        switch (action) {
        switch (action) {
            case DragEvent.ACTION_DRAG_STARTED: {
            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)) {
                if (!mDragDropController.handleDragStarted(eX, eY)) {
                    return false;
                    return false;
                }
                }
+1 −1
Original line number Original line 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
    // 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
    // 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) {
    public PhoneFavoriteTileView(Context context, AttributeSet attrs) {
        super(context, attrs);
        super(context, attrs);