summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-11-02 11:27:38 -0800
committerBrandon Maxwell <maxwelb@google.com>2015-11-03 15:48:46 -0800
commit5e0d2d1c7ddac7be7c814492441bbde54fba8ca9 (patch)
tree081de660d51ae1993f78ec7db621e0e0b5498df1
parent8c03464c2c348af3bcd3bdfb911cd1bf17a760d0 (diff)
Retrieving nameAlternative for ContactInfo
Bug:19364093 Change-Id: I965707f5623db8b16bf5089b4bff3202db4192ec
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfo.java7
1 files changed, 7 insertions, 0 deletions
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) {