summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/ContactInfoCache.java
AgeCommit message (Collapse)Author
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
2016-02-22[Gradle] Allow dialer to be compiled as a librarySailesh Nepal
This CL adds a new build-library.gradle file for AOSP dialer. This allows the dialer to be built as a library that can be included from GoogleDialer. Switching to a library project meant making two other changes: - changed all switch statements that used resources to if statements. This was required because resource IDs are not final in library projects. - changed InCalUI code to import com.android.dialer.R instead of com.android.incallui.R. See http://b.android.com/82743 for more info on why this is required. src-N isn't supported yet. Also, this isn't the ideal project layout. In the future we should consider switching to the following layout: - dialer/incallui/ <- incall UI as an independent library project - dialer/dialerlib/ <- dialer code as an independent library project - dialer/app <- skelent app that builds a standalone dialer AOSP app Bug: 26676586 Change-Id: I07fbee4d33cc683539e4f8b3953c93f1427af9d7
2016-01-29Saving the contactSpecificRingtone after remote lookupBrandon Maxwell
- Remote contact lookup was overwriting the cached contact specific ringtone. This resulted in a longer wait time for the ringtone to play since it would require the contact lookup to complete again. - This CL prevents the cached ringtone from being overwritten. Change-Id: I0a1cb30acd3aaf540533429c01427b185a7acf66
2016-01-27Play the ringtone for incoming calls in DialerBrandon Maxwell
+ Initial CL to make the Dialer play a ringtone for incoming calls. - Not included in this CL: - Playing call waiting tone - Silencing ringer when volume key is pressed (power button works properly) - Bug fix for ringtone not playing when lockscreen is set - Bug fix for contact look up taking too long - when do we play the default ringtone Change-Id: Ie8bd042b9ec142c78cb4d2de66475c96a18b8273
2016-01-25Open work profile QuickContacts for work contacts in personal dialerVictor Chang
Set lookup key for enterprise contacts to allow QuickContacts to open it. It requires framework change in NYC to support it. BUG=26176780 Change-Id: I61345d52aa9fa296fdf95eca624b295c86925e46
2016-01-13Show work badge icon/description in InCallUI/DialerVictor Chang
Add work badge icon into IncallUI Add work description into incoming call notification To see this feature 1. Receive/Make a call from work contact (a contact in work profile has the phone number) 2. See work description in incoming call notification and work badge icon in IncallUI BUG=26082618 Change-Id: I182b48a34d3d87ee3093e8433ae33939705d59d7
2016-01-11DO NOT MERGE Display no-caller ID reason in InCallUIRoshan Pius
Changes to fetch the no-caller ID reason from callsubject extra in the call object to display in the InCall UI. The callsubject extra would be populated by the RIL to hold the non-caller ID reason in case of number presentation that is set to RESTRICTED/UNKOWN and hence we need to differentiate the contents of this extra in InCallUI. PS: We should ideally be creating a different extra for the no-caller ID reason at telephony layer even if RIL sends it in the same exta as call subject, but that would require API changes. BUG: 22683773 Change-Id: I4ae51754d7660e4b8c1082d142e2c1860d3f1604
2015-11-16Fix NPE with contact cache, and guard against race condition.Nancy Chen
Because the image loading and contact interactions information are loaded asynchronously at the same time, one of them may be loaded before the other. To ensure that the main thread is aware when whether one or both of them have completed, keep a flag in ContactCacheInfo. This will prevent the callbacks from being cleared before all callbacks are completed. Also guard against NPEs by making sure the cache entry is added to the map of callIds to cacheEntries and check for null before proceeding in the callback for contact interactions. Bug: 25618632 Change-Id: I7662242e040948a1e445f66c362f2eaea4cf03af
2015-11-10Account for multiple open times for business contacts.Nancy Chen
Sometimes businesses will close in the middle of the day and reopen. We want to correctly represent the "open now"/"closed now" text for these breaks. Update tests accordingly. Bug: 25488385 Change-Id: I7ea96b1c037770261389297cb405a5e93d8171e4
2015-11-03Updating InCallUI to respect name display and sort preferencesBrandon Maxwell
+ CallCardPresenter, StatusBarNotifier, ConferenceParticipantListAdapter respect display name preferences + ConferenceParticipantListAdapter sorts names in conference call based on sort order preference ~ Still need to populate data objects with real data, currently it's just stubbed Bug: 19364093 Change-Id: I77ad9cb063bf439ae7e5551e40946ea29e414b7f
2015-10-21Add hours of operation info to incall business context.Nancy Chen
Display hours of operation information if it is available. If hours of operation are available, also determine whether it is currently open or closed. Display in the InCallUI when making a business call. Also add tests to make sure that the business context object is constructed correctly. Bug: 23351559 Change-Id: Ic2846e54e15ade37ccf0b916651cc3388da3cc23
2015-10-12Add location information with business caller ID.Nancy Chen
Display business address and distance when available when calling businesses. This information is only displayed during outgoing calls and while in the call. Bug: 23351559 Change-Id: Ifb9197cc3abf6d865e13de10862c610e8aa15fba
2015-09-11Logging changes in InCallUIYorke Lee
Log call metadata/non PII when a call is removed from the call list. Bug: 23164804 Change-Id: Id65d1fd4ab774587de3cd92fa7c71aee69cd4b84
2015-08-18Move MoreStrings to Dialer/utilJay Shrauner
Bug: Change-Id: I810f1cbbadaf482f379e2f8013a49d7ee5ce37ea
2015-05-11Save CNAP in call historyYorke Lee
If the call contains necessary CNAP information, try to save it into the CachedNumberLookupService. Bug: 10121624 Change-Id: I2e842b3145e00618b1afd3ed661d7c40764d0536
2015-04-20Add EmergencyCallListener.Andrew Lee
+ Add EmergencyCallListener, which fires when the call card is updated to indicate whether the call is an emergency call or not. Bug: 20300758 Change-Id: Ie9ad6ddecb278b56226804f5009504b4cc8b4cd5
2014-11-18Improve setting of contact photos in InCallUIYorke Lee
Add drawable caching in CallCardFragment so that we don't set the same drawable multiple times. Save and reuse the default contact photo and default conference photo to avoid possibly decoding them multiple times. Bug: 18373617 Change-Id: I54b925e6fc6f136f3d3ef27609fcdaf4c39a73dd
2014-10-24Fix NPE in findInfoQueryCompleteJay Shrauner
Ensure cacheEntry is always built. Bug:18111087 Change-Id: If1985902c9a6d34c0f5a31788079102010eb1630
2014-10-10Dont overwrite cnap name with a failed local lookup.Santos Cordon
Bug: 17916730 Change-Id: Iec19b5d02611b1cde23b57822157f278ae26d3ae
2014-09-12Renaming Telecomm to Telecom.Tyler Gunn
- Changing package from android.telecomm to android.telecom - Changing package from com.android.telecomm to com.android.server.telecomm. - Renaming TelecommManager to TelecomManager. Bug: 17364651 Change-Id: Ie5ae18f51baa5da2eb9793785ad0c9d83b6343d1
2014-09-09API changes in GatewayInfo, Response, and PropertyPresentation (2/4)Nancy Chen
* GatewayInfo: handle -> address, becomes SystemApi * Response: hidden * PropertyPresentation: class goes away, constants move to TelecommManager Bug: 17329632 Change-Id: I56180181a65e4b726e569aa4b8ac4cbb8dab00f9
2014-09-04Protect phonenumbers with Log.piiYorke Lee
Bug: 17329799 Change-Id: Ie9fff13e887fcfa2950be047f77205d4bc5a2e66
2014-08-27Merge "InCallUi image resource updates (mostly deletions)." into lmp-devAndrew Lee
2014-08-27InCallUi image resource updates (mostly deletions).Andrew Lee
- Deleted a ton of assets which were no longer used. + Automirrored some assets so their rtl copies could be removed. Bug: 15862303 Change-Id: I8aa832eead1768c82741fbe97268ea44ba0fc9ff
2014-08-27Restyle conference call manager screen.Andrew Lee
+ Swap out/in new assets for end/split icons in the manager screen, and the splash screen in the InCall screen. - Removed unused conference call manager code, including things like chronometer and the "done" button. + Replaced custom action bar in conferece call manager with standard action bar. + Added contact image (does not open quick contact) in the list of calls in the conference call manager. This is done with a lookup using the contact photo manager, and required adding the lookup key to the ContactCacheEntry. + Handled a missing Call.State case in CallCardFragment for calls with state CONFERENCED which caused crashes. + Misc style changes on conference call manager: colors, sizes, paddings. + Adjusted elevations so dialpad covers manager/secondary buttons. + Added ripple to manager/secondary buttons. Bug: 15862303 Change-Id: Iab9b6421d5a1ea69cd951a459d46c065f9456a8f
2014-08-18Asset swap for InCallUIYorke Lee
Bug: 17112104 Change-Id: I85ec1fda31ce626368c722c4de95f558b0b523d7
2014-08-13Final structural tweaks to Telecomm API (3/8)Ihab Awad
Bug: 16416927 Bug: 16494880 Change-Id: If756941a5bdd25ff8ac633a56fe90c894d4a46a4
2014-07-30Fix activity leaks in InCallUIYorke Lee
We were holding a reference to anonymous inner classes in CallCardPresenter in an static instance of ContactInfoCache, which was causing activity leaks. Refactor ContactInfoCacheCallback into a static inner class so that this fixes the problem. Bug: 16657866 Change-Id: I4da5cecd556f80fafd27f919b0aaa7f00b2a96f5
2014-07-14Implement new In-Call Service interfaceIhab Awad
Change-Id: Ic1eb6fc98e7f030885596c9c40f0ed4f0e34e28b (cherry picked from commit c90543e6ef64b16b4c1bb240494152bc513f1e36)
2014-07-11Misc Telecomm API changes: InCallUISailesh Nepal
This CL hooks up the new APIs introduced in ag/501321 to the InCallUI. Change-Id: Iaffe0b84cea6003f2a9b9d8b30676743d2b236d4
2014-07-10Use enterprise caller-id in incall.Makoto Onuki
- Use PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI for caller-id. - Removed a bunch of unused code. - Renamed fields that will have different semantics. e.g. contactId now will be 0 and lookupUri null for corp contacts. - Simplify the sip caller-id lookup. The regular caller-id lookup can also do SIP. The original code (http://ag/70555) was written before CP2 supported it (http://ag/147367). This needs QAing. - Instead of passing around a contact-id to later load a contact picture, use the picture URI returned from the API. Bug 15779911 Change-Id: Ia755b9079d03d9236f824c2f1102a6fa902b2097
2014-05-14am 07a822b2: InCallUI: Use telecomm presentation and gateway infoSailesh Nepal
* commit '07a822b2ea92dc5b68cd43139be7efe4c6640cd4': InCallUI: Use telecomm presentation and gateway info
2014-05-14am 6af0c61c: InCallUI - Use String IDsSailesh Nepal
* commit '6af0c61c32da6cfb400168ae3b0cf9f802abfed4': InCallUI - Use String IDs
2014-05-14resolved conflicts for merge of fc22ba88 to masterEvan Charlton
Change-Id: I686eff26a8172fe289866046f3b0a3f2392628c2
2014-05-02Add EXTRA_PEOPLE to the dialer notifications.Chris Wren
Bug: 14489962 Change-Id: I8e83cf04fc4acaefcb83fa2ea7c37d091c99f5c1
2014-04-01InCallUI: Use telecomm presentation and gateway infoSailesh Nepal
Switch to use Telecomm's CallNumberPresentation and GatewayInfo. Change-Id: I962836c5f4b36c0b1f31d0dd6852fdf8a3a12736
2014-04-01InCallUI - Use String IDsSailesh Nepal
Change-Id: Ibacb79658c146466d4f23bfcf7af0ebfb6e84dd0
2014-04-01InCallUI - Use custom object to track CallsSailesh Nepal
This is the first step in completely moving away from Telephony. This CL creates a custom Call object. Currently this is just a copy of the telephony Call object. I'll update various fields in individual CLs. This CL also deletes the old Telephony services. Bug: 13643568 Change-Id: Id1860a5df9706f2a7fddd40e70f0d693af7b04bd
2013-11-14Add callState parameter to reverse lookup requests.Chiao Cheng
This will provide contextual information to the server so that reverse lookup can be turned off for outgoing calls. Also add Gservices parameter so that additional query parameters can be added in the future. Bug: 11630566 Change-Id: I2186d73712e64e242e0f953f5d77125879c83148 (cherry picked from commit 96e77cd102b25ec30955d1da80be2df703eeda5a)
2013-10-25Removing private dependencies in InCallUiChristine Chen
- This CL addresses most of the private API calls in InCallUi. - This CL removed Android.mk as we are not building InCallUi.apk separately anymore. Changes to make an unbundled app will go into Dialer, GoogleDialer, and Contacts apps' makefiles. - Separated CLs will add libphonenumber, libgeocoding, and util classes for TelephonyManager and PhoneNumberUtils. - The only thing left for InCallUi is to unbundle ProximitySensor. Currently PowerManager's functions to deal with the proximity sensor are all private. It will take a rather substaintial amount of work to implement the proximity sensor functions ourselves (read proximity sensor event values, ask the screen to turn on, etc.). So we should rather push to get those functions into the public API. Change-Id: I18b3c52adb41c6131c1eb3c07ce32ebd56d0cc59
2013-10-09Pull login protected images for profiles.Chiao Cheng
Some GAL photos are login protected. The server supports oauth via http header. Change the reverse lookup api to lookup images by account if the image is identified to be login protected. Bug: 11106770 Change-Id: I92b506d325835a74f846829b0c03eed330938952
2013-10-01Default to business avatar for businesses without an image.Chiao Cheng
Bug: 10988291 Change-Id: If06f30fdc6d12d1abcb20cd7a10b8d80a02ab22b
2013-09-18Adds DISCONNECTING state support.Christine Chen
When user ends a call locally, we first set the call state to DISCONNECTING and show "Hanging up" as the status. We then show the "Call ended" status when the telephony layer comes back with the DISCONNECTED state for the call. Bug: 10808537 Change-Id: Iad5eda6ee34e2f04a861977ac1a2453a52081d27
2013-09-17Removing finished TODO(klp)Christine Chen
Bug: 10605909 Change-Id: Ia4bfcc385d4bf36cbc3b401521714958fd829c7e
2013-09-16Add internet call type labelYorke Lee
Bug: 10764487 Change-Id: I87e48063b14629c19a58b9ddb2acb736af6f37e0
2013-09-14Merge "Pass number to fetchImage as cache key" into klp-devJay Shrauner
2013-09-14Pass number to fetchImage as cache keyJay Shrauner
Pass phone number in on fetchImage lookups so it can be used to save the image to the cache. Bug:10760102 Change-Id: I3afb5e99aa4e8a4bc9148f6cfda4e5eba48ec476
2013-09-13Fix UI lag when calling a contact with a photo.Santos Cordon
Related fixes unrelated to latency problem: a. Update StatusBarNotifier with new changes to CallerInfoCache. b. Outgoing JANK fix in notifier needed to know if the activity was previously started, not just if it was finished. (b/10734874) c. Consolidate places where we use the Intent. Several improvements to speed up startUp time from most egregious to least: 1. In InCallPresenter, statusBarNotifier wasn't unlistening to incoming call changes which kept orphaned instances still listening and calling into contactInfoCache. ContactInfoCache was subsequently calling into many notifiers which did heavy image parcelling work. - Clear incomingCallListeners on tear down. 2. StatusBarNotifier was getting called directly from InCallPresenter & onIncomingCall() callbacks. onIncomingCall callback was unnecessary and caused extra work. - Fix is to stop listening to incoming calls. Status bar notifier gets called directly by InCallPresenter in startAndFinish() so listening to incoming was redundant. 3. Make ContactInfoCache listeners list a Set to avoid duplicate entries and reduce callback execution. bug:10712670 bug:10734874 Change-Id: Ic8d50b1d9ce336ffe3a5191abe1c9db32365eee6
2013-09-13Fix flow of local/remote lookupsJay Shrauner
Redo logic for looking up numbers. Push all logic into ContactInfoCache findInfo routine. Bug:10634005 Change-Id: I87bd987780ba744222d3adc82cf359e3c20f121f
2013-09-03Fix incall image for local contacts.Chiao Cheng
The contact info callback was being called back at a minimum of two times. Once for the name and text data and a second time for the photo. The results of the first call triggers reverse lookups and was causing it to trigger twice. To fix it for both cases, break out the callback into two separate calls to the client can properly handle the cases differently. Bug: 10607629 Change-Id: I2e0754d2d7c46bc2797a1a672827bd2f8d56e5d8
2013-08-30Fix provider lookup when coming back from notification.Chiao Cheng
- Provider lookups were being dropped because the cache lookup code throught the info already existed. This was due to the cache not being cleared in all cases. - Also made cache thread-safe since it is being used from both the ui thread and background lookup threads. Bug: 10545307 Change-Id: I8f10d6cc827d8ece773c2cae443b40b5ce521ad6
2013-08-29Ensure that OUTGOING calls bring up the notification dialog.Santos Cordon
Change-Id: I32b3ed77dae7f839036ea24ae09b9a9d0e87b746
2013-08-28Major fixes for in call to work with reverse number lookup.Chiao Cheng
- Separated caller info data into CallIdentification and switch callbacks to use it where call state is un-necessary. - Changed mCallList.update() method to be onIncoming(). - Catch all exceptions from service methods so errors do not vanish. - Fixed bind failure cases which led to DeadObjectException. - Changed local contact lookup to only occur for incoming calls. - Fixed CallCardPresenter to start contact search upon isntantiation instead of waiting for next call update. - Convert ContactInfoCache to singleton to avoid race condition where it's not initialized. - Handle cases where primary call may be null when we find a contact. - Fixed race conditions in CallButtonPresenter where audio mode is being set before ui is ready. - Fixed race condition in AnswerPresenter where state change was being called before ui is ready. - Changes to CallCardPresenter to support lookup for conference calls. Bug: 10413515 Bug: 10390984 Change-Id: I9fc4f2f35e8f5aad33c301b3c5c93132634cb63c
2013-08-21Protect all logging statements.Chiao Cheng
- Rename global logger so it can be a drop in replacement for framework log class. - Remove imports of android.util.Log Bug: 10411948 Change-Id: I377625263b16c4f9408c79d5c533a1810fa6cde7
2013-08-13Use shared contact info cache to get data for the notification.Santos Cordon
Move around where ContactInfoCache is created so that StatusBarNotifier and CallCardPresenter will use the same shared instance. Change-Id: I6e0a7c48aa7a35a0f1a52b399eb127d69f41a879
2013-08-13Add Simplifying layer between Contact Info search and CallCardProvider.Santos Cordon
I will be getting contact info on notifications for the next CL so this creates a simpler layer for interacting with the contact data async requester. CHANGES: - Moved the code which does the requesting from CallCardPresenter to ContactInfoCache. - ContactInfo Cache defines new listening interface and new simpler object for transmitting the return data: ContactInfoEntry. - Updated CallCardPresenter to use the new simpler interface. - Updated some logging entries. - Simplified Ui interface inside for CallCardPresenter. Change-Id: Ic802c4e53cdf17fcd37c70deb6da61a78b9d8993