summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/common
AgeCommit message (Collapse)Author
2021-08-21Automatic translation importMichael Bestas
Change-Id: Ie3a73c54c766044acbcc8608dd54cc502518799e
2021-02-28Automatic translation importMichael Bestas
Change-Id: I74c642b3b9aad5034895cc0cc72a8f3c986797db
2018-07-10Update translation strings.Eric Erfanian
Test: make Change-Id: Ib75f4f25e91067311de244d7f1fb95bc898aec22
2018-05-11Add RTT after call promo bottomsheet.wangqi
Bug: 67596257 Test: unit tests PiperOrigin-RevId: 196049621 Change-Id: I6f9c6292b1d56e3faf7808aa668b03d07230a70b
2018-05-09Add some annotations that won't influence aosp.weijiaxu
Test: blaze test. PiperOrigin-RevId: 196047666 Change-Id: Ia54e342113f9dbc9fe884b9a85d0f4db33f94cf5
2018-05-04Don't force open keyboard when RTT is active.wangqi
Bug: 79094585 Test: manual PiperOrigin-RevId: 195130360 Change-Id: I2763ddd950d0fe2479b442fe18363b8ec45a3178
2018-04-25Show clear frequents option in the toolbar if there are suggested contacts.calderwoodra
Bug: 36841782 Test: SpeedDialAdapterTest PiperOrigin-RevId: 194210091 Change-Id: I5b8ad5ca43ee6f519de09ad2a8b1b959637a825b
2018-04-11Add support for support fragments in UiListener.calderwoodra
Bug: 36841782 Test: SupportUiListenerTest PiperOrigin-RevId: 192502743 Change-Id: Id06ed732528db1ae486def86ecc2f44828635d81
2018-03-26Remove obsolete version checks and compat utilities after min SDK was bumped ↵linyuh
up to N. Test: Existing tests PiperOrigin-RevId: 190508397 Change-Id: Ia5f33e45af1d1cc666fec5f43efa564b2b68c193
2018-03-22Use SwitchPreferenceWithClickableSummary instead of SwitchPreference for VM ↵uabdullah
Donation The learn more link needs to be in the summary of the switch preference, however having a hyperlink in the summary text view of a switch preference does not open the hyperlink. To do this we made our custom switch preference which allows the summary to be clicked. All other aspects of the switch preference remain the same. Bug: 74033229 Test: Unit test PiperOrigin-RevId: 189978676 Change-Id: I31e744f3545e576ee3f5ac4a8fee249e22835e19
2018-03-08Implement non-ui logic for delete/undo delete voicemailsuabdullah
When a voicemail is deleted we have to allow the user the option of cancelling the deleting of voicemail. This is done by showing the user a snack bar which when a user taps will prevent the voicemail from being deleted. This CL only adds the underlying logic for the delete/undelete to take place via a ScheduledFuture, it does not fix all the UI issues that come with it, which will be sent in a follow up CL, issues such as: -Updating the group label when a delete/undo happens -Updating the entries above and below when a delete/undo happens -Showing the empty view immediately when a user deletes a single voicemail -Removing the empty view immediately when a user taps undo -Updating tests Bug: 69858266 Test: Manual PiperOrigin-RevId: 188424489 Change-Id: Iecf5cb7be5b80fa5e91acaad3a7cc4a6c8702521
2018-02-27Move DirectoryCompat from "contacts/common" to "dialer/common/cp2".linyuh
Bug: 73887387 Test: Existing tests PiperOrigin-RevId: 187225355 Change-Id: I65de553078e147a46d933daf34dfd912fc8aa74c
2018-02-22Add simulator RTT call.wangqi
This change will also: 1. Disable proximity sensor for RTT call 2. Update RTT call screen, including colors and banner buttons Bug: 67596257 Test: presubmit PiperOrigin-RevId: 185541897 Change-Id: I571373efbb8ced4ee2ad94879e9d37bed33b6a28
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-02Split MainActivity into two peers, old and new to keep logic isolated.calderwoodra
This change updates MainActivity to defer lifecycle callbacks and other relevant methods to which ever peer is active, old or new. The old peer implements the logic for the old fragments. The new peer implements the logic for the new fragments. MainActivity implements the logic that is shared or common between the two like last tab, post call, search, dialpad, ect. Bug: 72525324 Test: pending PiperOrigin-RevId: 184317828 Change-Id: Ie73733f2a3837c9d63e54cf5b142984633340731
2018-01-30Update FragUtils to encourage better readability in Activities.calderwoodra
Bug: 72525324 Test: existing PiperOrigin-RevId: 183776841 Change-Id: Ia78002d3da823a228cf5a29f93cd53ad21105f94
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-16Implement dialer command line interfacetwyen
This CL adds a generic interface to perform action and retrieve data in dialer. Test: Unit tests PiperOrigin-RevId: 182128015 Change-Id: Ib45ce9808bd4e0e4a9c9e05c0017e19c3213bb0d
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-08Automated rollback of changelist 178323108zachh
Test: tap PiperOrigin-RevId: 181196939 Change-Id: I97405c5356814fe3ad02d498cfa96c210921c477
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
2017-12-27Remove field prefixes.linyuh
Test: Existing tests PiperOrigin-RevId: 180230450 Change-Id: I0b2589cfeeaef81e42a04efa48af24b4e4d0e95f
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-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-07Fixed compile error in AOSP due to use of guava 23 API.zachh
Futures.submitAsync is V23 and AOSP is currently stuck at V20. This is just a completely non-sensical dummy implementation of DialerFutureSerializer until we can figure out what to do. Test: tap PiperOrigin-RevId: 178323108 Change-Id: I1dc2c8ddfa7ef3e15170543dadefbe4fc2e19226
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-11-30*** Reason for rollback ***roldenburg
Copybara is fixed for AOSP export Bug: 68665330 Test: rollback PiperOrigin-RevId: 177480870 Change-Id: I0ba38e213bb840436fa6dafc4af0a79019ee93f4
2017-11-18Adding exponential backoff utilitiesmdooley
This cl adds two classes, one to calculate a base multiplier for an exponential backoff series and the other to return sequential values in an exponential backoff series. This cl has a number of advantages over the previous one, such as: - separating the base multiplier calculation from the exponential backoff class so that a standard exponential backoff class like com.google.common.labs.concurrent.RetryStrategy.ExponentialBackoff could be used instead if it becomes open source - allows the backoff sequence to be scaled by specify an initial backoff delay - uses milliseconds instead of arbitrary time units which allows the tolerance to be set automatically when calculating the base multiplier WANT_LGTM=zachh Bug: 66966157 Test: unit tests PiperOrigin-RevId: 176130268 Change-Id: I75135d4df16f642ea9dd3ef9ff9498981beae2c6
2017-11-11Add UiThreadExecutorZachary Heidepriem
This CL adds an executor which runs tasks on the Ui thread, using the existing ThreadUtil class. Bug: 67752611 Test: UiThreadExecutorTest PiperOrigin-RevId: 175046280 Change-Id: Iff15e216be0e91891a9d63fddf1288ecbec41f83
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-01Removed helper methods in DialerExecutors.zachh
We now use dagger everywhere for consistency and explicitness. Test: tap PiperOrigin-RevId: 174071122 Change-Id: I15d2f8261a7b753353be9e7d3b80692aa0c1b64d
2017-10-25Improved dagger support for executor services.zachh
By always creating executor services via dagger, we can now bind special versions during espresso tests that can implement idling resources. We should be using idling resources during espresso tests for threads that we create ourselves, because espresso does not know about them. Hopefully this reduces some of the flakiness of espresso tests that we have today. This required converting all existing calls to DialerExecutors to pass a context used to fetch the component, and also required creating new application classes for espresso tests. Test: temporarily added a task which just slept to DialtactsActivity and verified that its integration test failed due to idling resource timeout PiperOrigin-RevId: 173334773 Change-Id: I876a93022d235d62cfc377bf5b06687e21a34758
2017-10-06Adding Future method for DialerPhoneNumberUtilmaxwelb
This CL adds a method to DialerPhoneNumberUtil which returns a Future holding the result of parsing a number into the DialerPhoneNumber proto. This will be used in the APDL integration as it will use Futures as well. The CL also changes DialerExecutors.lowPriorityThreadPool to be an ExecutorService instead of an Executor (the super type) so it can be used in MoreExecutors.listeningDecorator. Test: TAP PiperOrigin-RevId: 171347542 Change-Id: I620aacf3304d625f57af6d2b89a36f11b44008dd
2017-09-22Update package assets and strings.Eric Erfanian
Test: TH Change-Id: I48e807f3eafbc82401b2674a2610b20bf118c275
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-23Update Dialer to v10 RC39Eric 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: RC39 Branch: dialer-android_release_branch/153304843.1 dialer-android_20170416.00/dialer-android_20170416.00_RC39 This release contains the following bug fixes since RC32: Bug: 38137349 38249439 38299262 38329114 Test: make Change-Id: I65f695db8aa20902fa60835d58b41cfdfe42704b
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
2017-04-06Update AOSP Dialer source from internal google3 repository atEric Erfanian
cl/152373142. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/151342913 (3/27/2017) to cl/152373142 (4/06/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I2fbc88cf6867b90ac8b65f75e5e34468988c7217
2017-03-27Update AOSP Dialer source from internal google3 repository atEric Erfanian
cl/151342913. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/151128062 (3/24/2017) to cl/151342913 (3/27/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I8d4855628b62e9067e71f32ed40317617a1e3b02
2017-03-27Update AOSP Dialer source from internal google3 repository atEric Erfanian
cl/151128062 Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/150756069 (3/21/2017) to cl/151128062 (3/24/2017). Notable this release: - Explicitly enumerate host and target dependencies. - Update proguard flag references. This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Bug: 33210202 36511925 Addresses 33210202 - Proguard support 36511925 - Compiler warnings when building against platform sdk Change-Id: I448ec3b3f2358886859cf7a4ef76a8fcef3244ae
2017-03-17Update AOSP Dialer source from internal google3 repository at cl/150392808Eric Erfanian
Test: Treehugger Notable this release: * Reintroduce localization. This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from 3/15/2017 to cl/150392808 (3/16/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: Ia16d68469c2ca1ff42c7fa31d922bdb78c4e244a
2017-03-15Update Dialer source from latest green build.Eric Erfanian
* Refactor voicemail component * Add new enriched calling components Test: treehugger, manual aosp testing Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942
2017-03-01Update dialer sources.Eric Erfanian
Test: Built package and system image. This change clobbers the old source, and is an export from an internal Google repository. The internal repository was forked form Android in March, and this change includes modifications since then, to near the v8 release. Since the fork, we've moved code from monolithic to independent modules. In addition, we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make. New dependencies have been added: - Dagger - Auto-Value - Glide - Libshortcutbadger Going forward, development will still be in Google3, and the Gerrit release will become an automated export, with the next drop happening in ~ two weeks. Android.mk includes local modifications from ToT. Abridged changelog: Bug fixes ● Not able to mute, add a call when using Phone app in multiwindow mode ● Double tap on keypad triggering multiple key and tones ● Reported spam numbers not showing as spam in the call log ● Crash when user tries to block number while Phone app is not set as default ● Crash when user picks a number from search auto-complete list Visual Voicemail (VVM) improvements ● Share Voicemail audio via standard exporting mechanisms that support file attachment (email, MMS, etc.) ● Make phone number, email and web sites in VVM transcript clickable ● Set PIN before declining VVM Terms of Service {Carrier} ● Set client type for outbound visual voicemail SMS {Carrier} New incoming call and incall UI on older devices (Android M) ● Updated Phone app icon ● New incall UI (large buttons, button labels) ● New and animated Answer/Reject gestures Accessibility ● Add custom answer/decline call buttons on answer screen for touch exploration accessibility services ● Increase size of touch target ● Add verbal feedback when a Voicemail fails to load ● Fix pressing of Phone buttons while in a phone call using Switch Access ● Fix selecting and opening contacts in talkback mode ● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text Other ● Backup & Restore for App Preferences ● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is connected ● Rename “Dialpad” to “Keypad” ● Show "Private number" for restricted calls ● Delete unused items (vcard, add contact, call history) from Phone menu Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958