summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog
AgeCommit message (Collapse)Author
2018-02-22Rebuild Call Log on first launch after NUI is enabledtwyen
This improves the first time experience by populating the DB when the user is still in other tabs. Bug: 72119926 Test: Unit tests PiperOrigin-RevId: 186418788 Change-Id: If011d7191a09fd1aaca489c6e682ccdc643c2139
2018-02-22Moved metrics related methods out of LoggingBindings.zachh
Test: existing PiperOrigin-RevId: 186413083 Change-Id: I96c88c46b0ecc01167b655fa30fc47aaa6a9e351
2018-02-22Record jank metrics in old and new call logs.zachh
Bug: 70989667 Test: unit PiperOrigin-RevId: 186410938 Change-Id: I0671ab0bbbe957b8f034c673e6309204284756d2
2018-02-22Initialize/Update the UI of New{CallLog|Voicemail}Fragment iff the fragment ↵linyuh
is truly visible. Bug: 73347270 Test: NewCallLogFragmentTest, NewVoicemailFragmentTest PiperOrigin-RevId: 186350076 Change-Id: Ib3e320f02a02795acb8b7d2017818b36df3dd49d
2018-02-22Use a broadcast receiver to refresh the annotated call log.linyuh
Bug: 73347270 Test: Existing tests + RefreshAnnotatedCallLogNotifierTest PiperOrigin-RevId: 186347066 Change-Id: I5a530416bdaa9edc7131a0d5ced44f1b5ee1692b
2018-02-22Include the primary callback action in the new call log's bottom sheet.linyuh
Test: ModulesTest PiperOrigin-RevId: 186006639 Change-Id: I0c37d342d4a6da563b49b3ebe8f8ee2262efde60
2018-02-22Include both PHOTO_URI and PHOTO_THUMBNAIL_URI in Cp2Info.linyuh
Bug: 73007132 Test: NumberAttributesConverterTest, PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 185545712 Change-Id: I228d8c4e1b6327e38057f73aad63bb7048704d49
2018-02-14Mark calls as read in new call log.zachh
Playing with the existing app, the missed call becomes unbolded when: 1) Expanding the row. The closest analog of this is in the new UI is opening the bottom sheet, I've done that. 2) Swiping away from the call history tab. This can't be done in NewCallLogFragment because it doesn't know if the user is selected a new tab or pressed Home. So, I implemented this in NewMainActivityPeer. 3) After viewing the call log for 3(ish) seconds and leaving the activity pressing Home/Back. This is best done in NewCallLogFragment#onResume since MainActivity doesn't always know when the fragment is being displayed (it could be done after the user comes back to the app after pressing Home for example). Note that the notification is also removed in all of these cases. Also note that dismissing the notification makes the call unbolded (but this case already appears to be handled via the system call log content observer). Also, as part of writing tests for this, I made TestCallLogProvider more realistic. Bug: 70989622 Test: manual PiperOrigin-RevId: 185457438 Change-Id: Ib360d3bc73083bd1a018ed98e2b7d9a69fb7fafb
2018-02-14Add bottom sheet options for blocked and/or spam numbers in the new call log.linyuh
Bug: 70989605 Test: ModulesTest PiperOrigin-RevId: 185392711 Change-Id: I709a1e307925f1c99d2740ed52dc2b7784bca986
2018-02-09Show icon and label for a spam number in the new call log.linyuh
Bug: 73077158 Test: CallLogEntryTextTest, GlidePhotoManagerImplTest, PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 185017362 Change-Id: I113472482da2213d17a847054272a22249edc578
2018-02-05Match redlines in new call log.zachh
This includes: -Moved call count to after icons -Bold PhoneAccount for new calls -Fixed recycling issues in call type icons and phone account -Fixed cropping at bottom of "y" character (see b/67913060) -Reduced nesting in layout -Removed dimens.xml as it shouldn't be shared by voicemail -Set the alpha for Wifi/HD icons depending on read/unread status -Don't color call type icons, except for missed -Call type icons scale with display size -Call type icons are larger (18dp) in new UI Note that FrameLayout is used to ensure that icons/callCount view is not clipped, and instead contact name is ellipsized when the content is too wide to fit. Bug: 67913060,70989593,70989611 Test: unit and manual PiperOrigin-RevId: 184605728 Change-Id: Ie36c89354cbe4444ad2b42b6b0040430e396691c
2018-02-02Add Support for transcription state in the AnnotatedCallLoguabdullah
Transcription state column is needed for voicemail transcriptions. This CL adds the support for it in the NUI so that it maybe used by the VM Tab. Bug: 72491920 Test: Unit Tests PiperOrigin-RevId: 184335015 Change-Id: I14a71890224216c957e0d6146af9dafaa1550865
2018-01-29Added is_valid and post_dial_portion fields to DialerPhoneNumber.zachh
These are frequently used attributes of numbers that we can compute once at parse-time. Also did some general cleanup of DialerPhoneNumberUtil: -Removed unused Future version of parse() -Remove formatToValidE164 now that the new fields are available -Inlined normalizeNumber() Bug: 72563861 Test: existing PiperOrigin-RevId: 183720128 Change-Id: I702dc265360e590439c5352c493ae8a858f36812
2018-01-26Reworked the internals of DialerPhoneNumber.zachh
It turns out the storing the libphonenumber representation of the number is not particularly useful because even formatting these objects cannot be done on the main thread. Rather than propagate the requirement of using PhoneNumberUtil (and background threads by extension) in the call log UI, we now just store a dialer-normalized version of the number which contains all information required by the UI in a way that allows us to avoid any background work in the UI code. Bug: 72563861 Test: existing PiperOrigin-RevId: 183463907 Change-Id: I4bdadaccb7a84033b3c72c54fe3833064f587ee3
2018-01-26Added number presentation to AnnotatedCallLog.zachh
Updated the new call log UI to properly show text based on the presentation. Bug: 70989592 Test: unit PiperOrigin-RevId: 183414195 Change-Id: I2123f37cd3c733060125b6e894c1a80be4193ad6
2018-01-25Remove non call log dependencies on PhoneAccountUtiltwyen
Methods moved to TelecomUtils Test: Unit tests PiperOrigin-RevId: 183305626 Change-Id: Idd6604e58c06a36066bd49870849dd71747969c6
2018-01-24Add skeleton for SpamPhoneLookuplinyuh
Bug: 70989534 Test: SpamPhoneLookupTest PiperOrigin-RevId: 183174131 Change-Id: I46e819a0710ccce293195594e2f249e91d74551a
2018-01-24Show Icon and label for blocked numberstwyen
CallLogPhoto.getPhotoUri() returns a URI to a drawable so it will be easier to transition into glide. Meanwhile ContactPhotoManager will just show the drawable directly. Bug: 70989547 Test: Unit tests PiperOrigin-RevId: 183163818 Change-Id: I4ee4ff98782e35d2be03dfe14f8bf3dfd6ded074
2018-01-24Add flag to enable NUI shortcut.calderwoodra
Bug: 64655802 Test: n/a PiperOrigin-RevId: 183149638 Change-Id: Idc58efced8f70311eccd67f403bc5bd98f3f8518
2018-01-23Don't garbage collect voicemails in AnnotatedCallLog.zachh
We currently limit the size of AnnotatedCallLog to 999 via a trigger, but it doesn't exclude voicemails. Since we don't want to ever garbage collect the user's voicemails, exclude them from the trigger. This means that we can no longer assume a maximum size for the table (the user culd have more than 999 voicemails) so I've updated the places in the code where we did that before. Finally, I changed AnnotatedCallLog's CALL_TYPE column to be non-null. This is so that we can have more confidence that the trigger will work as intended. Null values cannot be compared in SQLite, so an expression like "where call_type != 4" won't actually match a null call type. Rather than implicitly fail to clean up such rows, we just crash completely when encountering such rows (even though I don't expect that to happen). Bug: 70989634 Test: unit PiperOrigin-RevId: 183006714 Change-Id: I9f4394a4812afe4b65c1e8427c355d825356557c
2018-01-23Moved coalesced_ids.proto and number_attributes.proto to ↵zachh
calllog/database/contract. The "model" package should be reserved for call history proper (and not voicemail) so it shouldn't contain things needed by voicemail. Test: existing PiperOrigin-RevId: 182976719 Change-Id: I463c8ed4600950a8d18db49d991609bfaa49c709
2018-01-23Write PhoneLookup results to PhoneLookupHistory in RealtimeRowProcessor.zachh
This is an optimization to reduce "popping" in the new call log. Since we have to do the PhoneLookup anyway to update the UI, we may as well write the result to PhoneLookupHistory so that the next time the AnnotatedCallLog is refreshed, the updated results can be retrieved from PhoneLookupHistory. I also updated RealtimeRowProcessorTest to use FakePhoneLookup rather than the real Cp2PhoneLookup since RealtimeRowProcessor no longer uses Cp2PhoneLookup directly (it was updated to use the general-purpose PhoneLookup in a previous CL but I didn't update the test at that time). Test: unit PiperOrigin-RevId: 182974567 Change-Id: I813e9d69f802ca08757238290fdfcf58e78b3592
2018-01-22Don't let the FAB obscure the last item of speed dial/call log/voicemail.linyuh
Bug: 72235391 Test: Manual PiperOrigin-RevId: 182848699 Change-Id: I587f5f4dd770278747114da17581c8fc253651c0
2018-01-22Changed PhoneLookup#lookup to accept a DialerPhoneNumber.zachh
There's a problem with the existing implementation of RealtimeRowProcessor; when CP2 information is not present, data from other sources can potentially be erased. This CL fixes the problem by fetching the latest data from all sources, instead of just CP2. This requires being able to fetch PhoneLookup info without a Call, using only a number, so I changed PhoneLookup#lookup to accept a DialerPhoneNumber rather than a Call. (The reason that it accepted a Call was to support CNAP so we'll need a revised solution for that later.) There is a potential concern with performance in RealtimeRowProcessor due to performing a full [Composite]PhoneLookup vs. a CP2 lookup, because the full lookup includes network requests. However, it's anticipated that the real time lookups will very rarely have changes to apply so this might be OK as-is. If not, a mitigation strategy could be improving the performance of CompositePhoneLookup#lookup by short-circutiing slower sources when faster, higher priority sources have already completed. A follow-up CL will write the result of RealtimeRowProcessor queries to PhoneLookupHistory to further reduce how frequently real time updates need to be applied. Bug: 72229553 Test: existing unit PiperOrigin-RevId: 182839130 Change-Id: I8cb26827b4f4dc4702fb416234c8938179cd5ac5
2018-01-19Add the "Yesterday" header in the new call loglinyuh
Bug: 70989598 Test: NewCallLogAdapterTest, CallLogDatesTest PiperOrigin-RevId: 182567571 Change-Id: Ieabbe709668d843334bc3bf4a128834fddb57cb8
2018-01-19Improved support for post dial digits in new call log.zachh
-Don't ever coalesce rows with different post-dial digits -Made matching of unparsable numbers a little more intelligent by comparing national/postdial portions which have undialable characters removed (rather than exact string match) -Read and append the post-dial digits from the system call log when building DialerPhoneNumbers to place in the AnnotatedCallLog. Note: PhoneNumberUtil will parse numbers with exactly one post-dial character, but not more than one. -Use post-dial digits when building the AnnotatedCallLog's FORMATTED_NUMBER value -Display the formatted number in CallDetails when the name is missing, instead of the unformatted number -Don't set the displayNumber in CallDetails when the name is missing, because we are showing the (formatted) number via the nameOrNumber field. -Treat numbers with post-dial digits as invalid in PartitionedNumbers; batch operations are not possible with these numbers because their normalized representations strip the post-dial digits (and they are significant for contact matching) Bug: 70989632 Test: unit and manual PiperOrigin-RevId: 182557754 Change-Id: Idcdefce0946a189e5b350a53ec2a16a96a8d4552
2018-01-17Relax number matching when coalescing rows in new call log.zachh
We currently require two numbers to be a PhoneNumberUtil.MatchType.EXACT_MATCH to coalesce them, but this means that two numbers like "456-7890" and "408 456-7890" won't ever be collapsed. This is potentially a likely situation since it is possible to dial numbers without an area code so we should better support it (and the old call log coalesces such numbers today). Bug: 70989626 Test: unit PiperOrigin-RevId: 182289194 Change-Id: If884d5a1f2631116a2729e0635f9a97aeca3e057
2018-01-17Show existing CP2 information for invalid numbers even if out of date.zachh
This is an optimization to reduce popping in the new call log. Currently when Cp2LocalPhoneLookup determines a number to be "incomplete" (because it is an invalid number and there are too many invalid numbers in the call log to efficiently bulk update) we clear the existing data, which has been populated in PhoneLookupHistory (for example, from InCallUi). This means that we will show the number initially when displaying the call log, and then when the query completes we will "pop in" the new information. This change makes it so that we don't clear the existing data from PhoneLookupHistory, and just add the "incomplete" bit. The result of this is that we immediately display the available information when initially displaying the call log (even though it may be out of date). When the query completes, the row will be updated with the most recent information; in most cases this is likely to be the same as the information used to initially display the row, and no update will need to be applied. Additoinal changes to support this functionality: -RealtimeRowProcessor is now just responsible for returning an updated row, and NewCallLogView holder will compare the result to the originally displayed row and only update the UI if there are differences. -NewCallLogFragment now calls clears the RealtimeRowProcessor's cache and notifies data set changed during onResume. This is to account for the fact that AnnotatedCallLog no longer contains the complete set of information necessary to show the call log; there may be changes we need to show which can't be detected by the cursor loader. We now show those potential changes in onResume. Additional notes: -If there is real-time data that changes after onResume it won't be detected but there shouldn't be such cases; changes made to contact information from dialer are always done through contact cards which pause the fragment. -This change has the effect that whatever information was written to PhoneLookupHistory during the previous invocation of InCallUi will always be (initially) shown. For example, if the contact name for number "123" is "Joe" when the call comes in, we'll write "Joe" to PhoneLookupHistory. If the user changes Joe's name to "Jane", the UI will pop from "Joe" to "Jane" until PhoneLookupHistory is updated (which is currently only done from InCallUi). If this turns out to be a problem it could be mitigated by writing updated results to PhoneLookupHistory from the UI. Test: unit, manual PiperOrigin-RevId: 182277145 Change-Id: I3d9916b7747390ff956f399fe84b26d578e5a07f
2018-01-17Replace PhoneLookupSelector with PhoneLookupInfoConsolidator.linyuh
PhoneLookupInfoConsolidator is designed for the following two purposes. (1) Different sub-messages in a PhoneLookupInfo proto can contain information for the same purpose. For example, all of cp2_local_info, cp2_remote_info, and people_api_info have the information for a contact's name. PhoneLookupInfoConsolidator defines the rules that determine which sub-message should be used to display the name in the UI. This is the same as PhoneLookupSelector. (2) Avoid mixing info from different sub-messages when we are supposed to stick with only one sub-message. For example, if a PhoneLookupInfo proto has both cp2_local_info and cp2_remote_info but only cp2_remote_info has a photo URI, PhoneLookupInfoConsolidator should return an *empty* photo URI as cp2_local_info has higher priority and we should not use cp2_remote_info's photo URI to display the contact's photo. This is what PhoneLookupSelector is unable to do. Bug: 71763594 Test: PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 182236013 Change-Id: If19cdc1a9e076f3ebc8f9e2901f050b519e273f2
2018-01-17Correctly show the contact's photo in CallDetailsActivity when launched from ↵linyuh
the new call log. Bug: 70218437,71867391 Test: ModulesTest & Manual PiperOrigin-RevId: 182233967 Change-Id: I6eb4bf236230eee6bbecc99b128fef5afddfd1e9
2018-01-12Fixed recycling issues in new call log.zachh
-Reset the text appearance when recycling -Clear the secondary call types when recycling Test: unit PiperOrigin-RevId: 181824011 Change-Id: I92cf2c570754e60f3559ad6b47157b3538c6e2cc
2018-01-12Clear the cache in RealtimeRowProcessor when there's new data.zachh
Otherwise changes to "incomplete" rows won't take effect until a new adapter is created. Test: unit and manual PiperOrigin-RevId: 181823087 Change-Id: I24e1b1b465c8d37cf794312b88b6cdd3ad394b5d
2018-01-12Do not show deleted voicemails in the NUI Voicemail tabuabdullah
Voicemails that are deleted or marked as deleted should not show up in the annotated call log. Bug: 71885122 Test: N/A PiperOrigin-RevId: 181719056 Change-Id: I7a5f7769ecbfc5feaaee36f0f1de48155576f458
2018-01-11Merge PhoneLookupDataSource results into a proto in annotated call log.twyen
This allow extra information from PhoneLookup to be more easily added. Only PhoneLookupSelector and the proto will be affected for new attributes. Test: Unit tests. PiperOrigin-RevId: 181675568 Change-Id: I4e0bc1c6005b58a9b684b030b55bea6223af9ce3
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
2018-01-11Minor polish and bugfixes for new call log.zachh
-Reuse the adapter in NewCallLogFragment to maintain position in call log when returning from call details -Convert empty values to null when invoking ContactPhotoManager to make photos appear correctly in new call log bottom sheets -Added CallLogContactTypes to be shared between proper call log and bottom sheets -Fixed vertical alignment in bottom sheet when there was no secondary text -Added some verbose logging Test: unit and manual PiperOrigin-RevId: 181655715 Change-Id: I9c1a42ad8d529ee2327e15fcc1d32b7b83982014
2018-01-10Fix PhoneLookupDataSource ignoring inserts if history is emptytwyen
Test: Unit tests. PiperOrigin-RevId: 181512134 Change-Id: If64b4cd184c60a807541cfe8727aa03532a80cb4
2018-01-09Rename Cp2PhoneLookup as Cp2LocalPhoneLookup and PhoneLookupInfo.cp2_info as ↵linyuh
PhoneLookupInfo.cp2_local_info. To support remote CP2 contacts, there will be a new PhoneLookup ("Cp2RemotePhoneLookup") and a new field in proto PhoneLookupInfo ("cp2_remote_info"). In proto PhoneLookupInfo, cp2_local_info and cp2_remote_info will be of the same type ("Cp2Info"). Bug: 71763594 Test: Existing tests PiperOrigin-RevId: 181405798 Change-Id: I6c43b486229d4e9ae7b55c579d9c9997a2884c80
2018-01-09Changed behavior of failures in DialerFutures#firstMatching.zachh
DialerFutures#firstMatching now fails if one of its provided futures fails before a match is found. This is to accomodate the case where no source returns true for isDirty, but one or more fail; we want to be notified of the failure in that case and not silently treat that case as not dirty. Also fixed a bug in NewCallLogFragment where the failed future wasn't causing the application to crash. Also improved some related logging in RefreshAnnotatedCallLogWorker and Cp2PhoneLookup, and fixed a bug where empty numbers were not being handled correctly. Bug: 71504246 Test: unit PiperOrigin-RevId: 181401710 Change-Id: I23e207ac334ff80ac95b08a8f4f775a528a8c511
2018-01-09Added RealtimeRowProcessor.zachh
This is for performing work inside of the call log's RecyclerView, when the view holder is bound. Most of the time, this should be a no-op but there are possible edge cases where the call log data cannot be updated efficiently through the standard batch mechanism. One example of this is when there are too many invalid numbers in the call log; the CP2 information for invalid numbers cannot be efficiently batch updated so we fetch this information at display time. (Note that we do handle up to 5 invalid numbers in the batch update mechanism, but if there are more than that we fallback to this realtime processing.) Test: unit, manual PiperOrigin-RevId: 181400016 Change-Id: Iea6b380742e757b48d19f319fe46dc5fae837604
2018-01-08Simplifying implementation of the coalescing logic in the new call log.linyuh
Bug: 70388714 Test: Existing tests PiperOrigin-RevId: 181231987 Change-Id: I0c7386f60e92f7087f9f5ad1b1f454b43b7227e7
2018-01-08Add "delete" option in the 3-dot menu of the new call loglinyuh
Bug: 69639422 Test: DeleteCallLogItemModuleTest, ModulesTest, and Manual PiperOrigin-RevId: 181191883 Change-Id: I86c19e8a402b03a58c6b236b9ca54fd81f0b6f9a
2018-01-05Implement dialer blocked number phone lookuptwyen
This CL implements looking up the dialer internal database for blocked numbers when the system database is not available yet. Data is only invalidated when dialer is alive since that is the only time blocked numbers can be set and removed. Bug: 70989538,70989547 Test: DialerBlockedNumberPhoneLookupTest PiperOrigin-RevId: 180956355 Change-Id: Ie7acf091bf58a074d0a1ee39613fad035d2e6e60
2018-01-04Set flag 'canReportAsInvalidNumber' in CallDetailsActivity's intent when ↵linyuh
it's launched from the new call log. Bug: 70218437 Test: ModulesTest PiperOrigin-RevId: 180841866 Change-Id: Iba25ce6a8716d85f86a6cea32386b949973ee59f
2018-01-04Add column CAN_REPORT_AS_INVALID_NUMBER to the annotated call log.linyuh
This column is filled by PhoneLookupDataSource using PhoneLookupInfo#PeopleApiInfo. Bug: 70218437 Test: AnnotatedCallLogDatabaseHelperTest, PhoneLookupDataSourceTest, RowCombinerTest, CoalescedAnnotatedCallLogCursorLoaderTest, PhoneLookupSelectorTest PiperOrigin-RevId: 180839783 Change-Id: I8d5ddb940670724fd4bf6dd6a50dcf408f91da9d
2018-01-02Add assisted dialing to the new call log.erfanian
Bug: 70506228 Test: new unit tests PiperOrigin-RevId: 180610636 Change-Id: I7f498df1a529737bf8473584836bdc3e04a5043c
2018-01-02Support assisted dialing in CallDetailsActivity when launched from the new ↵linyuh
call log UI. Bug: 70218437 Test: ModulesTest PiperOrigin-RevId: 180577770 Change-Id: Idbfe48ea22d422c90d970d633a952a7200f49f82
2017-12-27Parameterized PhoneLookup with submessage type.zachh
This allows indvidual PhoneLookups to define and deal mostly with their own submessage type (with the exception of trivial setter and getter methods for converting from/to PhoneLookupInfo). This also simplifies the FakePhoneLookup and tests which use it a bit, I think. Bug: 34672501 Test: unit PiperOrigin-RevId: 179976215 Change-Id: I2db1fc85771621be2f2afcd6af114d82680e30d0
2017-12-22Fixed crash in UiListener when launching activity with screen off.zachh
When launching MainActivity with the screen off (e.g. from Android Studio) the application would crash due to: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState Also use FragmentPagerAdapter in MainPagerAdapter as the number of tabs is small and can be stored in memory. Test: manual PiperOrigin-RevId: 179734952 Change-Id: Ib2ca9674f3174493da55bbbf0ef4053fcf73ab47
2017-12-22Include inserted calls for consideration in PhoneLookupDataSource.zachh
If there is a new call with a number that hasn't been seen before, it should be considered the same as numbers that are already part of the call log. Bug: 34672501 Test: unit PiperOrigin-RevId: 179628789 Change-Id: I422c24c444958dd8842aa14cf8a8069da5cec2c1
2017-12-22Register content observer when voicemail table changes.uabdullah
When a new voicemail is received, it is written in the voicemail table by the Voicemail service. However the new voicemail will not get updated/shown in the New Voicemail UI as the annotated call log would be stale. This CL ensures that when the voicemail is added, the annotated call log is marked dirty and refreshed. This way the new voicemail will be shown in the new voicemail UI. Since a new voicemail is also added, we want to make sure the headers for "today" and "older", their positions are also updated accordingly. Bug: 64882313 Test: Unit tests PiperOrigin-RevId: 179623267 Change-Id: I5dfc84f62f9f37c57ffb2dbbe7e848a58306a19d
2017-12-15Implement basic bottom sheet in NUI Voicemail tab.uabdullah
Implement the basic bottom sheet that displays name, location add to contacts, send a message and copy number option. Bug: 64882313,70682949 Test: Unit test, additional unit tests in the next CL that will implement calling from bottom sheet. PiperOrigin-RevId: 179212401 Change-Id: I23281587a0d42cea595e4dc1608f997036e2dbd0
2017-12-14Refactor add to contacts, send a message and copy number modules for bottom ↵uabdullah
sheet These three modules are to be shared between the voicemail and call log bottom sheets. This CL refactors it such that the functions take in generic parameters instead of coalesced annotated call log row so that they can be used by the voicemail tab. Bug: 64882313,70682949 Test: Existing tests PiperOrigin-RevId: 179110882 Change-Id: I2e8edafbf50e51d2299bfbcb95957e40c1b366ec
2017-12-14Support normalization of numbers in Cp2PhoneLookup.zachh
Bug: 34672501 Test: unit PiperOrigin-RevId: 179012381 Change-Id: Icb78c73e243702a71f1a48692151b696ae2ac95f
2017-12-13Integrate CallDetailsActivity with the new call log UI.linyuh
Bug: 70218437 Test: CallDetailsActivityTest, CallDetailsCursorLoaderTest, ModulesTest PiperOrigin-RevId: 178918820 Change-Id: Ib8034190550e8ca8e6e7fd9ce521bfadc73e834f
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-11Don't save UI executor in UiListener.zachh
When an activity is killed by the system, a new UiListener is created and attached, but it doesn't have its executor set. Rather than save it as an instance field, just get the Ui executor when needed, by passing the context to the listen method. Bug: 70510707 Test: unit and manual via "don't keep activities" developer option PiperOrigin-RevId: 178668338 Change-Id: I5360b525377edab5f3a117d1f0f50bf6da6a6f0c
2017-12-08In the coalesced call log, replace column NUMBER_CALLS with a new column ↵linyuh
COALESCED_IDS. For a row in the coalesced call log, COALESCED_IDS contains IDs of the corresponding rows in the annotated call log. These IDs will be used to (1) launch CallDetailsActivity or (2) delete the row in the call log UI. Bug: 70218437 Test: CoalescerTest, CoalescedAnnotatedCallLogCursorLoaderTest PiperOrigin-RevId: 178392968 Change-Id: I2d6cd46bec4d47a9e18941b7a019f39403fa76f5
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-07Made PhoneLookupDataSource implementation async.zachh
We were previously calling get() which can cause deadlocks. Bug: 34672501 Test: existing PiperOrigin-RevId: 178192772 Change-Id: Id9088b12b765307c778d101d847cb1016ea828d1
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-07Switched CallLogDataSource interface to be Future based.zachh
Bug: 34672501 Test: existing PiperOrigin-RevId: 178038086 Change-Id: I1230992ad04bb4415f5a29bd15802d23dff88012
2017-12-07Add DATA_USAGE column to the annotated call log.linyuh
Data in this column are copied from the DATA_USAGE column in the system call log (android.provider.CallLog.Calls#DATA_USAGE). Bug: 70218437 Test: AnnotatedCallLogDatabaseHelperTest, SystemCallLogDataSourceTest PiperOrigin-RevId: 177999609 Change-Id: I64d70734e8e85767f1e93a4a22ce2aae6c2168a1
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-30*** Reason for rollback ***roldenburg
Copybara is fixed for AOSP export Bug: 68665330 Test: rollback PiperOrigin-RevId: 177480870 Change-Id: I0ba38e213bb840436fa6dafc4af0a79019ee93f4
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 PhoneLookupDataSource and implemented isDirty.zachh
Also extracted FakePhoneLookup to a testing package. Bug: 34672501 Test: unit PiperOrigin-RevId: 175923790 Change-Id: I866708a676e788051b369a024344967975c05979
2017-11-18Set total duration for NUI voicemail media player seekbaruabdullah
The duration of the voicemail shown in the seekbar/media player (upon expanding) should be the same as the duration shown when the voicemail view holder is collapsed. Both values are retrieved from the same source (VoicemailEntry). Bug: 64882313,68382421,69268144 Test: Unit Tests PiperOrigin-RevId: 175712662 Change-Id: I70496c004d52deb1793e6d6354b0ec79bf4c4398
2017-11-18Added URI for selecting distinct phone numbers from AnnotatedCallLog.zachh
This will be used in the PhoneLookupDataSource. A separate URI is necessary because the content provider APIs do not provide a mechanism for querying using the "distinct" keyword. Bug: 34672501 Test: unit PiperOrigin-RevId: 175706603 Change-Id: Ia455a18d10afb116d26f69e8b0c7493f4f877d0b
2017-11-12Use type TEXT instead of STRING for annotated call log columns.zachh
The declared type of "STRING" has an affinity of NUMERIC, not TEXT per: https://sqlite.org/datatype3.html Bug: 34672501 Test: existing PiperOrigin-RevId: 175237916 Change-Id: I220a35f3060eb60870f6e930c821bdb2f6d2c7ed
2017-11-11Hook up pre-call actionstwyen
This CL replaces all instance of CallIntentBuilder.build() with PreCall.getIntent(), which when run as an activity, will finish building the intent with user interaction. Bug: 64216442 Test: manual PiperOrigin-RevId: 174924323 Change-Id: If41868df4c7ed078d03bd3431fa85b8947056a01
2017-11-03Show HD icon in call logs.wangqi
This change removes restriction of showing HD icon only for some Motorola devices. After this change, any devices writing android.provider.CallLog.Calls.FEATURES_HD_CALL into call logs' feature will be able to show HD icon. To be able to write HD features into call logs, both CarrierConfigManager#KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL and CarrierConfigManager#KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL must be enabled. It's part of upstream change to enable HD icon in call logs: https://android-review.googlesource.com/#/q/topic:hd_icon_call_log Bug: 68108125 Test: none PiperOrigin-RevId: 174091763 Change-Id: I17c62153ebbc866c91acdaa7a7fcbd124594772b
2017-11-01Renamed call_details string, which was conflicting with one from the ↵zachh
calldetails package. Test: tap PiperOrigin-RevId: 174084052 Change-Id: I10c07767392060fafed048a74df5aece4090cd68
2017-11-01Use unencrypted storage for shared prefs in new call log.zachh
We need to be able to write the shared prefs when the device is in direct boot mode, and this data is not sensitive so can be unencrypted. Bug: 68350256 Test: existing unit, manual PiperOrigin-RevId: 174075154 Change-Id: Ib52e11c6abba0812d1dc07c642691359089c3e6e
2017-10-27Use string concatenation for CREATE_TABLE_SQL instead of StringBuilder()uabdullah
The current implementation is easy to read but causes klippy warnings. Also removed the AnnotatedCallLogDatabaseHelperTest.voicemailColumnsExist and combined it with the onCreate Test Test: Unit Test PiperOrigin-RevId: 173614534 Change-Id: If00f7e91f48e582aa481268d88a4871cc2364684
2017-10-25Add support for voicemailURI to annotated call log for new voicemail tabuabdullah
VoicemailUri is required to play voicemail audio files. We need it to be able to play the voicemails in the voicemail tab. A follow up CL will be using the uri to play the audio, but via a media player. Bug: 64882313 Test: Unit tests PiperOrigin-RevId: 173422683 Change-Id: Ib438e3020c83e11a2c54c3e941c93e83dba9bc90
2017-10-24Rename the new bubble package name from "bubble" to "newbubble".Eric Erfanian
It fixes AOSP for package name conflict. Test: manual PiperOrigin-RevId: 173298696 Change-Id: Id10ebe0bcf029e61f65cf6580c7198abd8395081
2017-10-17Display Voicemail Contact Name and Photo in Voicemail Fragment.uabdullah
This CL lays the foundation of querying the annotated call log, retrieving only the voicemail entries and some of the voicemail information in the Voicemail tab. This CL only displays the name/number as well as the corresponding photo of the voicemails present on the device. WANT_LGTM=zachh SCREENSHOT: http://screen/YYBG8T0Ma0J Bug: 33006245, 64882313 Test: Unit tests and manual verification. PiperOrigin-RevId: 172504512 Change-Id: Ie7187b021abf42d1a4522458a1ab28537a7c222c
2017-10-13Use CONTENT_URI_WITH_VOICEMAIL for SystemCallLogDataSourceuabdullah
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
2017-10-11Added basic bottom sheet to new call log.Zachary Heidepriem
Also added ability to click on row to call. Required plumbing through the original phone number and phone account info through AnnotatedCallLog and CoalescedAnnotatedCallLog, so that clicking to dial doesn't require an additional lookup. Required some refactoring: -created autovalue for CoalescedRow. -created autovalue for ContactPrimaryActionInfo and use it in ContactActionBottomSheet -moved logic for building primary and secondary text into CallLogUtils so it can be shared between call log list and bottom sheets -moved clipboard logic to own package for copying numbers Bug: 34672501 Test: unit PiperOrigin-RevId: 171760252 Change-Id: I645d89974460b611c1d9668c3ca3e50a716c7f8f
2017-10-04Only show the most recent call type icon in the new call log, instead of the ↵zachh
last 3. This is according to the latest PRD: https://docs.google.com/document/d/1FLoQ6kNYL-QKplbniJAIUCHku87S9eYuYPs6IXe-U78 Also cleaned up warnings in CallLogQueryHandler. Screenshot: https://screenshot.googleplex.com/Z7p4BRVpLpE Bug: 34672501 Test: unit PiperOrigin-RevId: 170941445 Change-Id: Ibf79b70eda3837ea46d365729aaed0a87961e42b
2017-08-31Update Dialer source to latest internal Google revision.Eric Erfanian
Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. Test: make, flash install, run Merged-In: I45270eaa8ce732d71a1bd84b08c7fa0e99af3160 Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436
2017-05-15Update Dialer to v10 RC32Eric Erfanian
This release was created following the instructions at: go/dialer-aosp-release Subsequent dialer releases will follow as O bugs are fixed, until we reach our final RC. Version: 10 Candidate: RC32 Branch: dialer-android_release_branch/153304843.1 dialer-android_20170416.00/dialer-android_20170416.00_RC32 This release contains the following bug fixes since RC17: Bug: 33176679 33272455 3646510 36773894 37297649 37413780 37513689 37640315 37680595 37698062 37873639 37901752 37919295 37953423 38062852 38069600 38137349 38173549 38180252 38191514 Test: make, on device Change-Id: I4e4bb630082758e418ff24892b7db3142c6eb09a
2017-05-03This change reflects the Dialer V10 RC00 branch.Eric Erfanian
RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f