summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteListView.java5
-rw-r--r--src/com/android/dialer/list/PhoneFavoritesTileAdapter.java4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteListView.java b/src/com/android/dialer/list/PhoneFavoriteListView.java
index 4e0b8ff0e..9160e3a9c 100644
--- a/src/com/android/dialer/list/PhoneFavoriteListView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteListView.java
@@ -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 =
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
index ae9414a4a..ce18a2b87 100644
--- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
@@ -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.
*/