summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-27 14:35:50 -0700
committerYorke Lee <yorkelee@google.com>2013-09-27 14:38:53 -0700
commit52112414bcc95394e537185316168dcdc943544f (patch)
tree026d3f5ba8440c9e528f98e6aea813553facb9b8 /src
parentb4680c5b453d0c4028b34bf9dcd28ec76922e095 (diff)
Disable drag and drop if the undo dialog for a favorite is showing
Bug: 10955634 Change-Id: I1a562a03aa7a7de016687803c154b6a3915e3e10
Diffstat (limited to 'src')
-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.
*/