Fix fast scroller regression in People

Bug: 10841097
Change-Id: I8abb74704dc106d82db3c7d1882e254b20e4df31
diff --git a/src/com/android/contacts/common/list/PinnedHeaderListView.java b/src/com/android/contacts/common/list/PinnedHeaderListView.java
index 034a3dc..18de663 100644
--- a/src/com/android/contacts/common/list/PinnedHeaderListView.java
+++ b/src/com/android/contacts/common/list/PinnedHeaderListView.java
@@ -414,9 +414,14 @@
 
         if (mScrollState == SCROLL_STATE_IDLE) {
             final int y = (int)ev.getY();
+            final int x = (int)ev.getX();
             for (int i = mSize; --i >= 0;) {
                 PinnedHeader header = mHeaders[i];
-                if (header.visible && header.y <= y && header.y + header.height > y) {
+                // For RTL layouts, this also takes into account that the scrollbar is on the left
+                // side.
+                final int padding = getPaddingLeft();
+                if (header.visible && header.y <= y && header.y + header.height > y &&
+                        x >= padding && padding + mHeaderWidth >= x) {
                     mHeaderTouched = true;
                     if (mScrollToSectionOnHeaderTouch &&
                             ev.getAction() == MotionEvent.ACTION_DOWN) {