summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-11-04 21:52:42 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-11-04 21:52:42 +0000
commit1201742b1689d95a262f3f807aebbc290ef6d544 (patch)
treee7cdaab02c88b8be0f83f82e0c2fa0ca275fa8de /src/com
parent381f492b05c7e86479dc0ee58e8eec431f059cf8 (diff)
parentab4443c7e235e0feebca7eadf70ecd9bd2455b46 (diff)
Merge "Changing method to public, static for use in InCallUi" into ub-contactsdialer-a-dev
Diffstat (limited to 'src/com')
-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) {