From 5e0d2d1c7ddac7be7c814492441bbde54fba8ca9 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Mon, 2 Nov 2015 11:27:38 -0800 Subject: Retrieving nameAlternative for ContactInfo Bug:19364093 Change-Id: I965707f5623db8b16bf5089b4bff3202db4192ec --- InCallUI/src/com/android/incallui/CallerInfo.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'InCallUI') diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java index 3ddeb71b1..2ed5722aa 100644 --- a/InCallUI/src/com/android/incallui/CallerInfo.java +++ b/InCallUI/src/com/android/incallui/CallerInfo.java @@ -31,6 +31,7 @@ import android.text.TextUtils; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.contacts.common.util.TelephonyManagerUtils; +import com.android.dialer.calllog.ContactInfoHelper; /** * Looks up caller information for the given phone number. @@ -177,6 +178,12 @@ public class CallerInfo { info.name = cursor.getString(columnIndex); } + columnIndex = cursor.getColumnIndex(PhoneLookup.LOOKUP_KEY); + if (columnIndex != -1) { + info.nameAlternative = ContactInfoHelper.lookUpDisplayNameAlternative( + context, cursor.getString(columnIndex)); + } + // Look for the number columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER); if (columnIndex != -1) { -- cgit v1.2.3