summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-11-04 21:55:47 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-04 21:55:47 +0000
commit15bff3251371e2c6c41e0c7a5a4e985718840f09 (patch)
treedaa425a0fcfab0f85d9afb6ad10b17a62775cd04 /src
parent9c1f663531721840b4d42ec6226a8d30bbe4d9cf (diff)
parent1201742b1689d95a262f3f807aebbc290ef6d544 (diff)
Merge "Changing method to public, static for use in InCallUi" into ub-contactsdialer-a-dev
am: 1201742b16 * commit '1201742b1689d95a262f3f807aebbc290ef6d544': Changing method to public, static for use in InCallUi
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/ContactInfoHelper.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java
index 4b9d5532a..e760750b2 100644
--- a/src/com/android/dialer/calllog/ContactInfoHelper.java
+++ b/src/com/android/dialer/calllog/ContactInfoHelper.java
@@ -170,7 +170,7 @@ public class ContactInfoHelper {
}
String lookupKey = phoneLookupCursor.getString(PhoneQuery.LOOKUP_KEY);
ContactInfo contactInfo = createPhoneLookupContactInfo(phoneLookupCursor, lookupKey);
- contactInfo.nameAlternative = lookUpDisplayNameAlternative(lookupKey);
+ contactInfo.nameAlternative = lookUpDisplayNameAlternative(mContext, lookupKey);
return contactInfo;
} finally {
phoneLookupCursor.close();
@@ -193,10 +193,14 @@ public class ContactInfoHelper {
return info;
}
- private String lookUpDisplayNameAlternative(String lookupKey) {
+ public static String lookUpDisplayNameAlternative(Context context, String lookupKey) {
+ if (lookupKey == null) {
+ return null;
+ }
+
Uri uri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey);
- Cursor cursor = mContext.getContentResolver().query(uri,
+ Cursor cursor = context.getContentResolver().query(uri,
PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION, null, null, null);
if (cursor == null) {