summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-08-12 15:23:34 -0700
committerYorke Lee <yorkelee@google.com>2013-08-12 15:23:34 -0700
commit0719f0c70e7c4093f934e059bb02f2a276c245a0 (patch)
tree78987bb843563a7c96c104d9d945e0415024e5de
parentc8f977ed41199b85fa995b38e93ae546eab045cf (diff)
Fix wrong contact being hidden from favorites
The index of the tiled favorite being removed was being calculated incorrectly because the incorrect coordinates were being passed the method that determined the hit rectangles. Bug: 10292444 Change-Id: I46e5dd09e0e0ccee8278e72fcfee21c050330f56
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java b/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java
index ac089c76f..034dc0ab2 100644
--- a/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java
+++ b/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java
@@ -90,7 +90,9 @@ public class PhoneFavoriteDragAndDropListeners {
Math.abs(x2 - x1) > mFlingHorizontalThreshold &&
Math.abs(velocityX) > FLING_VELOCITY_MINIMUM) {
// If fling is triggered successfully, end the scroll and setup removal dialogue.
- final int removeIndex = mView.getParentRow().getItemIndex(x1, y1);
+
+ final int removeIndex = mView.getParentRow().getItemIndex(mView.getLeft() + x1,
+ mView.getTop() + y1);
mView.setScrollEnd(false);
mView.setupRemoveDialogue();
mView.getParentRow().getTileAdapter().setPotentialRemoveEntryIndex(removeIndex);