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

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

Merge "Disable drag and drop if the undo dialog for a favorite is showing" into klp-dev

parents 50c92e02 52112414
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -325,6 +325,11 @@ public class PhoneFavoriteListView extends ListView implements SwipeHelperCallba
        }

        final ContactTileRow tile = (ContactTileRow) child;

        if (tile.getTileAdapter().hasPotentialRemoveEntryIndex()) {
            return false;
        }

        final int itemIndex = tile.getItemIndex(x, y);
        if (itemIndex != -1 && mOnDragDropListener != null) {
            final PhoneFavoriteTileView tileView =
+4 −0
Original line number Diff line number Diff line
@@ -667,6 +667,10 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements
        mPotentialRemoveEntryIndex = -1;
    }

    public boolean hasPotentialRemoveEntryIndex() {
        return isIndexInBound(mPotentialRemoveEntryIndex);
    }

    /**
     * Clears all temporary variables at a new interaction.
     */