diff options
author | Yorke Lee <yorkelee@google.com> | 2013-09-27 14:35:50 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-09-27 14:38:53 -0700 |
commit | 52112414bcc95394e537185316168dcdc943544f (patch) | |
tree | 026d3f5ba8440c9e528f98e6aea813553facb9b8 | |
parent | b4680c5b453d0c4028b34bf9dcd28ec76922e095 (diff) |
Disable drag and drop if the undo dialog for a favorite is showing
Bug: 10955634
Change-Id: I1a562a03aa7a7de016687803c154b6a3915e3e10
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteListView.java | 5 | ||||
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoritesTileAdapter.java | 4 |
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. */ |