From 0719f0c70e7c4093f934e059bb02f2a276c245a0 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 12 Aug 2013 15:23:34 -0700 Subject: 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 --- src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3