summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/CallLogAdapter.java
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2015-03-09 13:44:02 -0700
committerMakoto Onuki <omakoto@google.com>2015-03-10 10:47:57 -0700
commit7c414093c8c66a69cfea77a0ac10c1354f96cb7c (patch)
tree052ecd35e647cb7aa4ba63ecf73d58747b6bb0b0 /src/com/android/dialer/calllog/CallLogAdapter.java
parent896ad48a0b7bd33b6ba4499e8d11d503fd52d6ba (diff)
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
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java9
1 files changed, 7 insertions, 2 deletions
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 {