Fix bug 7250807 Ellipsizing is broken

The ellipsis wasn't showing in names in the Contacts app. It turns out
that the problem was simply a discrepancy between onMeasure and onLayout
for the TextView displaying the name: the former wasn't taking into
account the mTextIndent. Thus, the actual TextView was short 8 dip,
resulting in truncation on the right (which usually resulted in loss of
the ellipsis).

This change simply takes mTextIndent into account when doing the
measurement of the child TextView for mNameTextView.

Change-Id: I750d32c6444937d87a7dfc25850ba7e486b3c6ae
diff --git a/src/com/android/contacts/list/ContactListItemView.java b/src/com/android/contacts/list/ContactListItemView.java
index bfe06b0..4b2e254 100644
--- a/src/com/android/contacts/list/ContactListItemView.java
+++ b/src/com/android/contacts/list/ContactListItemView.java
@@ -306,8 +306,13 @@
         // Also calculate their heights to get the total height for this entire view.
 
         if (isVisible(mNameTextView)) {
+            // Caculate width for name text - this parallels similar measurement in onLayout.
+            int nameTextWidth = effectiveWidth;
+            if (mPhotoPosition != PhotoPosition.LEFT) {
+                nameTextWidth -= mTextIndent;
+            }
             mNameTextView.measure(
-                    MeasureSpec.makeMeasureSpec(effectiveWidth, MeasureSpec.EXACTLY),
+                    MeasureSpec.makeMeasureSpec(nameTextWidth, MeasureSpec.EXACTLY),
                     MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
             mNameTextViewHeight = mNameTextView.getMeasuredHeight();
         }