From 7c414093c8c66a69cfea77a0ac10c1354f96cb7c Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Mon, 9 Mar 2015 13:44:02 -0700 Subject: Show corp contacts in call-log... as wells as the missed-call notification. Just PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI instead of PhoneLookup.CONTENT_FILTER_URI. This CL requires the new column in calllog provider. Change-Id: I61a2f63bcad102cb8a7e8021483b7dfe254abd95 --- src/com/android/dialer/calllog/CallLogAdapter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 8bfe0dec5..914520e84 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -1169,6 +1169,10 @@ public class CallLogAdapter extends GroupingListAdapter values.put(Calls.CACHED_PHOTO_ID, updatedInfo.photoId); needsUpdate = true; } + if (!UriUtils.areEqual(updatedInfo.photoUri, callLogInfo.photoUri)) { + values.put(Calls.CACHED_PHOTO_URI, UriUtils.uriToString(updatedInfo.photoUri)); + needsUpdate = true; + } if (!TextUtils.equals(updatedInfo.formattedNumber, callLogInfo.formattedNumber)) { values.put(Calls.CACHED_FORMATTED_NUMBER, updatedInfo.formattedNumber); needsUpdate = true; @@ -1182,6 +1186,7 @@ public class CallLogAdapter extends GroupingListAdapter values.put(Calls.CACHED_MATCHED_NUMBER, updatedInfo.number); values.put(Calls.CACHED_NORMALIZED_NUMBER, updatedInfo.normalizedNumber); values.put(Calls.CACHED_PHOTO_ID, updatedInfo.photoId); + values.put(Calls.CACHED_PHOTO_URI, UriUtils.uriToString(updatedInfo.photoUri)); values.put(Calls.CACHED_FORMATTED_NUMBER, updatedInfo.formattedNumber); needsUpdate = true; } @@ -1214,7 +1219,7 @@ public class CallLogAdapter extends GroupingListAdapter info.number = matchedNumber == null ? c.getString(CallLogQuery.NUMBER) : matchedNumber; info.normalizedNumber = c.getString(CallLogQuery.CACHED_NORMALIZED_NUMBER); info.photoId = c.getLong(CallLogQuery.CACHED_PHOTO_ID); - info.photoUri = null; // We do not cache the photo URI. + info.photoUri = UriUtils.parseUriOrNull(c.getString(CallLogQuery.CACHED_PHOTO_URI)); info.formattedNumber = c.getString(CallLogQuery.CACHED_FORMATTED_NUMBER); return info; } @@ -1352,7 +1357,7 @@ public class CallLogAdapter extends GroupingListAdapter } else { try { Cursor phonesCursor = mContext.getContentResolver().query( - Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, number), + Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI, number), PhoneQuery._PROJECTION, null, null, null); if (phonesCursor != null) { try { -- cgit v1.2.3