summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonelookup
AgeCommit message (Collapse)Author
2017-12-12Updated writing of PhoneLookup columns in annotated call log.zachh
We're not going to use the "cached" columns from the system call log any longer, and instead will write them using PhoneLookup. Bug: 34672501 Test: unit PiperOrigin-RevId: 178788155 Change-Id: I9255dd3cb727eef3b45bc05aeb3c6fd6fd513d63
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-07Renamed PhoneLookup#bulkUpdate to #getMostRecentPhoneLookupInfo.zachh
This is just to more clearly convey what the method does. Bug: 34672501 Test: existing PiperOrigin-RevId: 178188575 Change-Id: Id02f34b1d79346ecd8ca9eebc043fe9b3063264b
2017-12-07Added bindings for ListeningExecutorServices.zachh
Use them where appropriate. Bug: 34672501 Test: existing PiperOrigin-RevId: 178182298 Change-Id: If454225e0d636c7cb14b5af02d46780d7732abf0
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-12-07Added PhoneLookupSelector.zachh
This class is responsible for prioritizing and selecting data from a PhoneLookupInfo object, which contains information from many phone lookup sources. Bug: 34672501 Test: unit PiperOrigin-RevId: 177893924 Change-Id: Ib98a4656fe87141162a7ac53af4a0ad421196046
2017-12-07Removed timestamps from PhoneLookup APIs.zachh
Also added onSuccessfulBulkUpdate method. It is safer for each PhoneLookup to keep track of its own last processed time via shared prefs where the value saved is the actual last processed timestamp from the underlying data. This is because it is difficult or impossible to select a single time that spans lookups due to queries being run and processed at different times. The onSuccessfulBulkUpdate method is provided as a hook for PhoneLookups to persist their shared pref once they know the result of bulkUpdate have been successfully saved. Finally, removed usage of the lastModified timestamp from PhoneLookupHistory in PhoneLookupDataSource since I believe the cases it was originally intended to cover are now handled by populateInserts(). Bug: 34672501 Test: unit PiperOrigin-RevId: 177891586 Change-Id: I072409fc217e4d7e36816548862e8b358aebf165
2017-11-29Implemented fill for PhoneLookupDataSource.zachh
Rewrote FakePhoneLookup to be more realistic. Bug: 34672501 Test: unit PiperOrigin-RevId: 177376374 Change-Id: Ifcd52b16b7046f39d1bfc0e8b8e76452a9daadd2
2017-11-18Added place voice call search action to regular search.calderwoodra
When a user types a phone number into the search bar, there isn't an intuitive way for them to place a call when the number doesn't match any existing contacts in the new search UI. This change adds the option to place a voice call from regular search, like the old UI. Bug: 69385190 Test: NSFT PiperOrigin-RevId: 176189153 Change-Id: I6c1561bcce104c56855d996570a79b34da7230ff
2017-11-18Added PhoneLookupDataSource and implemented isDirty.zachh
Also extracted FakePhoneLookup to a testing package. Bug: 34672501 Test: unit PiperOrigin-RevId: 175923790 Change-Id: I866708a676e788051b369a024344967975c05979
2017-11-11Use lambdas in CompositePhoneLookup.zachh
They should work now that we target guava 20 instead of 18 in AOSP. Test: tap PiperOrigin-RevId: 175354039 Change-Id: Id7844c3a1c8e29e5ecb13fa36a92dd80be0cfc7c
2017-11-11Use parent message for CP2 info in phone_lookup_info.proto.zachh
PhoneLookupInfo should contain one message per PhoneLookup implementation for clarity. Instead of having a repeated Cp2Info field, we now have a single Cp2Info field which wraps a repeated Cp2ContactInfo field. Also added ApdlInfo to the message to make testing of CompositePhoneLookup more realistic, in that it tests merging across submessages now. (ApdlInfo is more or less a placeholder until ApdlPhoneLookup is implemented.) Test: yes PiperOrigin-RevId: 175316738 Change-Id: I196c2eaa885e1268ff80ebaad6d85840a9cc7a15
2017-11-11Added content provider for PhoneLookupHistory.zachh
Bug: 34672501 Test: yes PiperOrigin-RevId: 175243488 Change-Id: Iec3b5eb0e81f6e6cc04c64c3ea65c9c7fcb33fe3
2017-11-11Implemented CompositePhoneLookup#bulkUpdate.zachh
Bug: 34672501 Test: unit PiperOrigin-RevId: 174532642 Change-Id: I0115fb26f99fe764bc90625e3ed51f3c4c99439d
2017-11-11Implement bulk update for Cp2PhoneLookup.calderwoodra
Test: Cp2PhoneLookupTest PiperOrigin-RevId: 174525877 Change-Id: I7888f3b6adc58416c560271166ec6bd85306d58b
2017-11-10Implemented CompositePhoneLookup#isDirty.zachh
IsDirty is implemented by (possibly in parallel) executing all child lookups, and completing as soon as the first lookup reports itself as dirty, cancelling other lookups upon completion. If a lookup fails for some reason, it is treated as not being dirty. This required adding a new method DialerFutures#firstMatching. Bug: 34672501 Test: yes PiperOrigin-RevId: 174261470 Change-Id: Icb4f7b5d9926094fc446542411d15d02a4b873a3
2017-11-10Fixed AOSP breakage due to incompatible guava api.zachh
Test: none PiperOrigin-RevId: 174258291 Change-Id: Idf4eb0096fef383bd5f3544fdedba03528d14f41
2017-11-10Set the ceiling at O.erfanian
Test: no PiperOrigin-RevId: 174239092 Change-Id: I6672c5b0a41df6426b527d1565f0cb216dc82917
2017-11-01Added CompositePhoneLookup and added and implemented "lookup" method.Zachary Heidepriem
Fleshed out docs for PhoneLookup. Added dagger components and modules. Bug: 34672501 Test: unit PiperOrigin-RevId: 173977963 Change-Id: If07795d9d3d56a59afd27cdda3e98543bf30fdb8
2017-10-26Cp2 Phonelookup isDirty implementation.calderwoodra
Checks if a cp2 contact has been modified or deleted. Bug: 67605130,64099602 Test: Cp2PhoneLookupTest PiperOrigin-RevId: 173499443 Change-Id: I1fa267c05732fba09f00113232d4370b159aa735
2017-10-11Skeleton implementation of PhoneLookup and Cp2PhoneLookup.calderwoodra
Bug: 67605130 Test: Cp2PhoneLookupTest PiperOrigin-RevId: 171757865 Change-Id: If92e759567456dda09a925e9c625df001f2d573f