diff options
author | uabdullah <uabdullah@google.com> | 2017-10-12 17:17:50 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-13 07:30:56 -0700 |
commit | 6037deb60e9ef708da2ddcf84a5ef5ccc27d7237 (patch) | |
tree | eb704214aaa229fb264c8ab0e2ac5173973a9ee9 /java/com/android/dialer/calllog/database | |
parent | cf83cae3d3cc0d6a53498da88a9ad834fb2ab589 (diff) |
Use CONTENT_URI_WITH_VOICEMAIL for SystemCallLogDataSource
Currently the SystemCallLogDataSource queries the call log table with CONTENT_URI. This works for the call log tab, but will not work for the voicemail tab. To allow the voicemail tab to query annotated call log for voicemail information, we need to surface up voicemail data from the system call log data source into the annotated call log.
Bug: 64882313,33006245
Test: Unit tests, also verified that in the call log only the non-voicemail entries show
PiperOrigin-RevId: 172036196
Change-Id: Ieac855ae854a043207c9ae668280391c790ac33d
Diffstat (limited to 'java/com/android/dialer/calllog/database')
-rw-r--r-- | java/com/android/dialer/calllog/database/AnnotatedCallLogContentProvider.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogContentProvider.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogContentProvider.java index 9a3d2e20f..39a806568 100644 --- a/java/com/android/dialer/calllog/database/AnnotatedCallLogContentProvider.java +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogContentProvider.java @@ -29,6 +29,7 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteQueryBuilder; import android.net.Uri; import android.os.Build; +import android.provider.CallLog.Calls; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract; @@ -121,7 +122,13 @@ public class AnnotatedCallLogContentProvider extends ContentProvider { Assert.checkArgument(sortOrder == null, "sort order not supported for coalesced call log"); try (Cursor allAnnotatedCallLogRows = queryBuilder.query( - db, null, null, null, null, null, AnnotatedCallLog.TIMESTAMP + " DESC")) { + db, + null, + String.format("%s != ?", CoalescedAnnotatedCallLog.CALL_TYPE), + new String[] {Integer.toString(Calls.VOICEMAIL_TYPE)}, + null, + null, + AnnotatedCallLog.TIMESTAMP + " DESC")) { Cursor coalescedRows = coalescer.coalesce(allAnnotatedCallLogRows); coalescedRows.setNotificationUri( getContext().getContentResolver(), CoalescedAnnotatedCallLog.CONTENT_URI); |