summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonelookup/database
AgeCommit message (Collapse)Author
2018-01-17Support deleting PhoneLookupHistory rows with empty phone numbers.zachh
Test: unit PiperOrigin-RevId: 182280850 Change-Id: I51a89f50d56af344425d5f67c6bcaa3928b457e9
2018-01-11Fixed bug in handling of empty numbers in new call log.zachh
Empty numbers were not being inserted into PhoneLookupHistory because the URI "content://.../PhoneLookupHistory/" is treated the same as "content://.../PhoneLookupHistory" (w/o the trailing slash). This caused the update (i.e. replace) operation to incorrectly update all rows in the table when it should have updated a single row. The fix for this was to switch to a query parameter, so the empty number URI now looks like "content://.../PhoneLookupHistory?number=" Also improved some logging while debugging this problem. Bug: 71866050 Test: unit and manual PiperOrigin-RevId: 181659081 Change-Id: Idec4fb77e74920cd5485620b0a997db03aa8ff9b
2017-12-07Implemented PhoneLookupDataSource#onSuccesfulFill.zachh
Required adding applyBatch functionality to PhoneLookupHistoryContentProvider so that the updates can be performed in a transaction. This code was just copied and modified from AnnotatedCallLogContentProvider. Also removed the trigger which limited the size of the PhoneLookupHistory, since we now delete rows from PhoneLookupHistory when the last occurrence of a number is deleted from AnnotatedCallLog. Since AnnotatedCallLog is bounded to 1000 rows PhoneLookupHistory is now indirectly bounded by that as well. Bug: 34672501 Test: unit PiperOrigin-RevId: 178323464 Change-Id: I233163fe70641b0e4b1d4c5c0e8970ad0b4b167d
2017-12-07Added PhoneLookupHistoryRecorder.zachh
When a call is added in InCallUi, it fetches the current PhoneLookupInfo for the call and writes it to PhoneLookupHistory. Required updating PhoneLookupHistoryContentProvider#update to use "replace" to (presumably) atomically insert when a row is missing. Bug: 34672501 Test: unit PiperOrigin-RevId: 177896892 Change-Id: I43f9ded240a81156722be816a9635d586de642a1
2017-11-11Added content provider for PhoneLookupHistory.zachh
Bug: 34672501 Test: yes PiperOrigin-RevId: 175243488 Change-Id: Iec3b5eb0e81f6e6cc04c64c3ea65c9c7fcb33fe3