summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/AnswerPresenter.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-05-06IMS-VT: Call showAnswerUi when onUpgradetoVideo callback is calledGarik Badalyan
- Glowpad wrapper is now seen when we receive an upgrade request as showAnswerUi is called when onUpgradeToVideo callback is invoked - Without this change, we don't see the Glowpad wrapper BUG=28384174 Change-Id: Ibeb1a49f6cc9b8b0d70d167debf496f897c7c14f
2016-04-05IMS-VT: Show Answer UI on receiving upgrade requestGarik Badalyan
Show Answer UI on receiving upgrade request to enable the user to respond to the upgrade request. BUG=27876152 Change-Id: I62fbd32e1c3b40df2136bd88d271484be8af52b6
2016-02-18IMS-VT: Moving upgradeVideoRequest handling to InCallPresenterTyler Gunn
When user pressed back key InCallActviity will be destroyed and corresponding listeners in VideoCallPresenter will be removed. Due to this we are unable to process the upgrade request. Moving handling of upgrade Video Call request handling from VideoCallPresenter to InCallPresenter as InCallPresenter will be available even InCallActivity is destroyed. Bug: 27130345 Change-Id: Idbd3348cea9d712c8391319d091642d1fd60964f
2016-01-20Ensuring quickResponse isn't available while fbe lockedBrandon Maxwell
+ Sending an outgoing message is not supported while in the fbe locked state so the option to send an SMS should always be hidden. Bug=26542221 Change-Id: I9d630bdf73ec9f6965607c60f36b7a04c04f4134
2016-01-08DO NOT MERGE Handle child number changes after the call starts.Ta-wei Yen
This CL is in master branch, but not in dialer branch, which causes a merge conflict in master for ag/841237 Reverting ag/841237, cherry-picking this and will reapply ag/841237 later. The child number display functionality assumed that the child number for a call would only bet set at the start of the call. This change removes that assumption and supports changes to the child number at any point during the call by adding a new listener to the InCall Call List. It appears there are some instances in reality where the child number can come in after the start of a call (delayed only slightly, but enough to prevent the number from showing up). Bug: 24585039 (cherry picked from commit 7a2da71d22645d619e04b1704138f183a5e47724) Change-Id: Id019dcb1fcdc7f13d738d9917bc9bbc4fe15dc02
2015-12-06Code cleanup.Tyler Gunn
1. Renamed some Call methods and cleaned up comments. 2. Renamed Incall CallUtils to VideoUtils. 3. Fixed some improper licenses. Bug: 20089489 Change-Id: Ia503db3b65d9aa990e562411de783f38dd08a9c2
2015-12-06Fix issue where upgrade request UX does not show.Tyler Gunn
+ adding back CallList listener to handle the onUpgradeToVideo event. This was removed when InCall fragments were refactored (before the onUpgradeToVideo method existed) in mnc-dev; meanwhile in m-wireless-dev the new onUpgradeToVideo listener was added. Bug: 21850707 Change-Id: I85df2feee5094bdde530cf810da3930745897b4d
2015-11-19Guard against framework calls to Video call APIs for backporting.Nancy Chen
Check compatibility verson before making method calls to VideoProfile or VideoCall. Use CallUtils for any method call that is using VideoProfile to determine if video calling is available or not. Bug: 25776171 Change-Id: I24fa049c0003547f9027bed8fabfb81d0fde6374
2015-08-05Last forwarded number and incoming call subject.Tyler Gunn
Last forwarded number: - Added assets for the "forward" icon for last forwarded number. - Modified InCall Call to store last forwarded number; also calls onLastForwardedNumberChange callback (the last forwarded number is received via a supp service update, so may change after call starts). Call subject (i.e. instant lettering): - Added placeholder subject_bubble asset to form the chat bubble for incoming calls with a subject. - Modified InCall Call to store the call subject (expected to be populated in extras at start of call. - Added code to hide the call status (e.g. "incoming call via XYZ") line and primary call label (e.g. a location "California", or the number type "Mobile" for the number). This was necessary to make room for the call subject bubble, and is in line with the UX mocks. - Change call subject text color to background color of call card (per UX mocks) - Modified call notification to show call subject if it is specified. - Moved code to show HD icon into common method. Bug: 22685114 Change-Id: I22d9dae16658490e3245cfdd9c936bb0584cd6db
2015-07-13Null protect getUi() in configureAnswerTargetsForSmsYorke Lee
Bug: 22442874 Change-Id: Id3d522415db3a551c646950a7023478226182ae9
2015-07-09Fix for glowpad not showing when dialing out + call waitingYorke Lee
The AnswerPresenter is responsible for initiating the creation of the UI during a new incoming call, so there is no need to do a null check on getUi in onIncomingCall. Original fix was made in ag/651766 but seems to have been lost in a series of merges. Also, if the same instance of InCallPresenter is reused across activity teardown and setups, this can result in mAnswerPresenter getting lost from the set of incoming call listeners. To fix this, always readd it at setup. Bug: 22357229 Change-Id: Iecd80fa0187d756181ada7631c4246ad48f7131e
2015-06-03API Cleanup: Remove references to VideoState.Tyler Gunn
Replace method references from VideoState to VideoProfile equivalents. Bug: 21573551 Change-Id: I3c5c55652e0dd12df97eac42f1791f8b67dbac5c
2015-05-11Merge "Dynamically check for permission denials" into mnc-devYorke Lee
2015-05-05DO NOT MERGE Video call upgrade/dowgrade request changes.Tyler Gunn
- fixed potential NPE in VideoCallFragment when setting preview size. - moved photo load into the postExecute for the async task -- it is already threaded and I was seeing intermittent concurrency issues. - Changed CallButtonFragment to retrieve max # of buttons from config.xml. - Added override for wider screens (e.g. N6 and wider) to show an extra button. - Reorganized call buttons so that the "Camera on/off" button is adjacent to the flip camera button. - Changed answer Glowpad to pass correct video state so that accepting a video request uses the correct state (important for accepting requests to turn camera back on). - added new Session modification state REQUEST_REJECTED for when the remote user explicitly declines the request. This is used to trigger a "video request rejected" message when the remote party rejects the request. Bug: 20257400 Change-Id: Ibe25eb045ee868748f91bf411f285629d36ebcd2
2015-05-04Merge commit 'b1c7028' into merge_try2Prerepa Viswanadham
Change-Id: I7cb5298c37e1f07f8b1b234605a211c6478963f0
2015-05-04Dynamically check for permission denialsYorke Lee
Don't crash when performing certain operations that the dialer might not have permissions to execute: * Access voicemail provider * Certain TelecomManager methods Bug: 20266292 Change-Id: I6326332943567aab0c59b4b4386d7bc434a71e4a
2015-05-04Merge commit '5e2731c' into merge_try2Prerepa Viswanadham
Change-Id: I880eb25812adaeb9355cc9c1dcf46afa0da5f333
2015-04-29Make glowpad ping run at startupYorke Lee
Bug: 20494371 Change-Id: I6b6eb4e5ec3ba76e08d0b87a0a49f758f95ac31b
2015-04-22Incoming video calls - accept only 2-way calls.Tyler Gunn
- In AnswerPresenter, only show the video targets if the incoming call is a bi-directional video call. Bug: 20254835 Change-Id: I34f3fd79d126a2ae621afeb13ceb2b143bdca2ce
2015-04-13Fix bad null check, caused crash on dial.Andrew Lee
Change-Id: I1465d784961ca60d11874eabc6ce7c4599019ec5
2015-04-10Fix buildPrerepa Viswanadham
Change-Id: I0c953bfa322ffe1be080af2180579e1abc770a2b
2015-04-10Merge commit '8bef461' into merge_workPrerepa Viswanadham
Change-Id: I4cfea114e24c0b0671e99118316ad839dafbe400
2015-03-26IMS-VT: Add support for video callsRekha Kumar
IMS-VT: Upgrade downgrade and hold resume video calls -Add support for upgrade downgrade video calls. -Add support for hold resume and call waiting IMS-VT: Fixed surface caching. Fixed surface caching. IMS-VT: Fixes InCallUI/Dialer crash when there is a VT call. -Fixes InCallUI/Dialer crash when UE is rotated. -Fixes InCallUI/Dialer crash when UE VoLTE call is upgraded to VT. Don't default to speaker phone for VT when speaker is disabled - The adb property persist.radio.ims.audio.output indicates whether speaker is disabled explicitly or not. - If the above property is set to 1, don't enable speaker phone by default in VT call. IMS-VT: Fix CVO, surface and resource related issues. - Send initial orientation to VT Service. - Detect if Activity is being destroyed due to confugration changes. - Close the camera when InCallUI is pushed to background. - Fix surface and VT service related issues when Fragment and Presenter gets destroyed. IMS-VT: Peer Resolution Feature Implementation Change display video size based on peer resolution values received from far end. IMS-VT: Answering calls and upgrade requests as VT_TX and VT_RX -Support for showing one way options for incoming upgrade request -Fix issue where incoming video popup stays on screen even after rejecting the request. -Fix issue where incoming video popup stays on even after it has been timed out by lower layers. - Answer with different calltypes support. Notify listeners of video quality changed event and display message on UI - Add methods to notify listeners of type VideoEventListener when video quality changes. - Display a notification on the UI when video quality changes. IMS-VT: Enable SIP based video multitasking. Enable SIP based video multitasking. IMS-VT: Call data usage feature - Add support for call data usage callback - Request for call data usage stats - Log call data usage stats when IMS layers send update Change-Id: I3f0dde0d82698085fa5d3f110720f10326eca768 IMS-VT: When TTY is ON, do not allow upgrade to VT call When TTY mode is ON, the user SHOULD NOT be allowed to upgrade a call from VOLTE to VT/VT-TX/VT-RX and an UI alert message will be displayed explaining upgrade to VT call cannot be initiated. IMS-VT: Add null check in call upgrade fail scenario Crash is observed if call is ended in the interval wherein handler is started to change state from REQUEST_FAILED to NO_REQUEST after an interval. Added null check to change state only when call exists Propagate call substate message and display a notification on the UI Ims: Reject upgrade request 1. If there is waiting call that is pending user action and 2. Before offering a waiting call IMS-VT: Provide Player State indication to user. Change to display "player started/stopped" toast message whenever video starts/stops flowing IMS-VT: Cleanup video views when not required - Hide video views when not required. Set display size as per current TextureView size - Using TextureView height and width to calculate the display size. - When ever there is change in display make sure that center the display. IMS-VT: Exit VT call full screen mode. If the call is no longer a VT call, then exit full screen mode Change-Id: Ibc4ad8f9a4c38e467820028cdc2c7e68d65fd93c CRs-Fixed: 760925 IMS-VT: Upgrade button fix -Show upgrade/downgrade button only when call is in ACTIVE or ONHOLD state IMS-VT: Show correct call types during video pause -In paused state, upgrade downgrade button does not list the calltypes dropdown box -Remove the paused bit to calculate call type during video paused state. IMS-VT: Move strings for video quality changed indication to resource files IMS-VT: Clean up the showCallSubstateChanged API - Make the code more readable. IMS-VT: Set audio route to Speaker if current route is not bluetooth or headset - We always set the audio route to speaker when we enter video mode. - That is not correct. We should check if headset or bluetooth is connected before defaulting to speaker. IMS-VT: Turn speaker on/off for video calls based on call state changes - Turn speaker on only when video call is active or dialing - Switch back to the previous audio mode when there are no more calls - Make the previous audio mode static so that information persists when the class is recreated (e.g. when UE is rotated or multitasking happens) IMS-VT: Use back camera instead of front camera for VT-TX Set back camera for below cases 1) VOLTE to VT-TX 2) VT to VT-TX 3) Waiting call over Vt-TX call. IMS-VT: Fix upgrade in call waiting scenarios -When one VoLTE call is active and another VoLTE call is on hold and upgrade button is hit, call ends. Fix this upgrade issue. IMS-VT: Enter video mode when the primary video call changes - We only enter video mode when we have any video state changes - Enter video mode should also be called when the video call changes. e.g. When we have a second call with the same video state, we don't enter video mode which is incorrect. This change fixes the issue Add null check for InCallActivity in setInCallAllowsOrientationChange - In some cases, this API is called when InCallActivity is null. This causes a null pointer exception. Fix is to add a null check. IMS-VT: Fix check for VOLTE call (AND to OR) when turning speaker on IMS-VT: Check if call is video before enabling speaker in updateAudioMode - Moved the video call check to the correct block where we are enabling speaker IMS-VT: Get call substate values correctly from the bit mask - We were getting the call substate incorrectly as an int. - Fixed that by getting it from the bit mask and using the possible multiple values to display the call substate message. IMS-VT: Keep the screen on during video calls. UI screens times out after some time. During video calls the screen must be kept on. Change-Id: Icaa8662210b2dd323b29f4a472869a9ed1e01d00 IMS-VT: Open front facing camera for VT calls. Open front facing camera for VT calls. IMS-VT: Show manage conference button for Video Call - We show the manage conference in a separate section for VOLTE Calls. - In the case of Video Call, the entire screen is occupied by the far end video. So we display manage conference in the overflow section of the call button fragment. IMS-VT: Fix camera preview freeze for CONF video calls. Fix camera preview freeze for CONF video calls. IMS-VT: Move persist.radio.ims.audio.output to frameworks Move persist.radio.ims.audio.output and related constants to TelephonyProperties and PhoneConstants so that these can be accessed from multiple git projects instead of redefining. IMS-VT: Multiple video call fixes/optimizations. -Current implementation clears primary call cache upon exiting video mode. This will remove video call provider interface as well, which will prevent further communication with the backend. Don't clear primary call cache upon exiting video mode. -Unregister call details listener when UI transitions into unready state -Send surface of incoming video to video call provider before opening camera. IMS: Cleanup all listener objects Clean all stale listener objects to avoid the memory leak. IMS: Fix speaker icon display issue in Call UI. In few devices, InCall UI can show upto five buttons in a row. Modify code to display at most five buttons in a row. Show overflow menu if number of buttons is more than five. IMS-VT: Show glowpad view with accept/reject for most video upgrade cases - Show the glowpad view with all options only when upgrading from Volte to VT - For all other cases, show the glowpad with accept/reject only Change-Id: I41ecbda40db7c3c69428fc4272f8bfbd258e2980
2015-03-13Dynamically add AnswerFragmentYorke Lee
AnswerPresenter is a little tricky because it is in charge of responding to incoming calls, so we want it to be alive and getting onIncomingCall callbacks, but we don't want to create an instance of AnswerFragment, which it is dependent on. Move some dependencies around so that AnswerPresenter is created by InCallPresenter instead. It registers for callbacks via InCallPresenter instead of directly to CallList, and shows/hides the AnswerFragment via InCallActivity. Change-Id: I7026150988bf3cda762dda8a319f48e1af132361
2014-12-02Merge "Stop ringer when selecting "respond via text"." into lmp-mr1-devNancy Chen
2014-11-28Telecom API updates (3/6)Ihab Awad
Bug: 18292176 Change-Id: I5bcb1838a8423f15ebdf87c945ca91da460506f4
2014-11-26Stop ringer when selecting "respond via text".Nancy Chen
Ringer should stop while user is selecting response from "respond via text" dialog. Bug: 14656360 Change-Id: Ib73e6f10f1bda8363b65391a53e61dc5eb5d8d8d
2014-09-24Reallow quick text response on lockscreenYorke Lee
Bug: 17399771 Change-Id: I9fbc8157e547b2368baa5ebe29001e2a338655a2
2014-09-14Fix for quick response option not showing up for call waitingYorke Lee
Text messages for a call are loaded by an asynchronous task and are not populated immediately for a new call. For the first incoming call, this is not an issue because they are usually loaded by the time Telecomm binds to InCallService, and the first call is added to InCallService. For the second(and subsequent calls) however, they are added to InCallService immediately before the text messages are loaded. This means that onIncomingCall is called in AnswerPresenter with a null list of text messages, which causes it to hide the quick response option. This CL refactors AnswerPresenter to also update the displayed options when a change in call state occurs, so that it shows the quick response option when the list of text messages are eventually loaded and sent to InCallService. Bug: 17426049 Change-Id: Id5209b91013b52c5ede5a5dcd4db8a981664c285
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-12Disable respond via message option if lockscreen is activeYorke Lee
Bug: 17399771 Change-Id: I54cdbd41df05c932ed8c5a61a9bc7f8eba9c8153
2014-08-22Ensuring Video APIs are only called when video is available.Tyler Gunn
Bug: 17179079 Change-Id: I3b327250c181f821ec37d574ae804f8003d04603
2014-08-13Final structural tweaks to Telecomm API (3/8)Ihab Awad
Bug: 16416927 Bug: 16494880 Change-Id: If756941a5bdd25ff8ac633a56fe90c894d4a46a4
2014-08-12Add UI/functions to handle a video upgrade request.Andrew Lee
+ Move session modification listener into the video call presenter. + Add new video accept/reject notification and full-screen UI. + Added "handling" which sends session modification response. Bug: 16657915 Change-Id: I35ff04e383d4938cbfb4e76677730f82557fd918
2014-08-06Remove ldaps from AOSP code.Santos Cordon
Bug: 16327484 Change-Id: If4678281e2da1f1c7f0bcb91d496f1fd371be536
2014-07-17Hook up answering as video call.Andrew Lee
Pass in the desired video state when answering incoming video calls. Bug: 16013878 Bug: 16015750 Change-Id: I7f46dadfdaa6ab256626d2e2e49971e114f506dd
2014-07-16Add video call handling for heads up notifications.Andrew Lee
- Add isVideo method to the InCallUI call. - Added cases and actions for isVideo to StatusBarNotifier. - Added cases for isVideo for processing incoming call in the full-screen experience in AnswerPresenter. - Did what I figured would be some cleanup, to consolidate some helper methods only ever called once, and reorder some methods to be more alphabetical. - Added new intent type for video calls (and revised old one for audio calls), which are dispatched by the StatusBarNotifier and received by the InCallApp. - Update icons used, and deleted unused icons. Bug: 16013878 Change-Id: If0a8d04e2ee6eaf8258ce6a677b22d55a584f9ab
2014-07-15Show different glowpad options for incoming video call.Andrew Lee
- Refactor code be more flexibile/specific in specifying the targets for the glow pad; went from "n-way" labeling of different target sets to more explicit labeling of scenarios, such as "audio without sms". - Add target sets and cases for showing targest in AnswerFragment. - Added new drawable for the target to answer a video call. - Add method to GlowPadView to allow changing the handle (now it may be either a videocamera or phone icon, depending on the scenario). - Add a new video handle for incoming video calls. - TODO: Hook this up to show these glowpads if there is an incoming video call. - Deleted some unused resource files. Bug: 16015750 Change-Id: I77ff08f45f57cd2817866b5d78648af8891bb675
2014-07-14Implement new In-Call Service interfaceIhab Awad
Change-Id: Ic1eb6fc98e7f030885596c9c40f0ed4f0e34e28b (cherry picked from commit c90543e6ef64b16b4c1bb240494152bc513f1e36)
2014-06-13DO NOT MERGE. Port "respond via SMS message" feature to new Telecomm. (4/4)Ihab Awad
Bug: 15275904 Bug: 15196474 Change-Id: Id7125d7803a00a80728e412bba030566a838bbc2
2014-04-01InCallUI: Use Telecomm CallCapabilitesSailesh Nepal
Change-Id: I4236543da5648d2cf6ba525c8fc87a93000f50a7
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
2014-03-19Support a second incoming call (call-waiting)Santos Cordon
Change-Id: I94730e0d628b9573eec2bf69c705599509a185b7
2014-03-10Update InCallUI to use new Telecomm wrappersSailesh Nepal
Change-Id: I4ea05f03418302bf9eb904bda25844a9c52ea609
2014-02-28InCall UI changes for incoming Telecomm calls.Santos Cordon
1. Send commands back to Telecomm when user hits answer/reject 2. Appropriately map Telecomm call states to in-call call states for call updates sent from Telecomm. 3. Use the working version of CallList.onUpdate(). The one we were using previously wasn't running in old code and didn't do everything necessary for supporting the incoming call screen. Added a TODO to remove it completely later. Change-Id: I0f1c330a5a68c4004d3102fbab6f20a51a8b029a
2013-10-10Removes stopPing from onSaveInstanceState()Christine Chen
- I don't think it makes sense to do any processing in onSaveInstanceState() as we are already stopping the ping in onWindowVisibilityChanged. - onSaveInstanceState() should solely deal with saving app states anyway. Bug: 11156202 Change-Id: If2b17bd10b455899703aa2c8f9d15f04a9bea22f
2013-10-07Adds support for texting after phone disconnects.Christine Chen
Bug: 11111553 Change-Id: I8abcae4439e7b9697d7b4a4335e093d7ad13a1b3
2013-10-05Add custom message dialog for Respond via Message.David Braun
We don't want to require SMS applications to implement activities that show over lock just to handle the "respond via custom message" scenario for rejecting phone calls. This change adds an entry dialog into the phone call UI. A separate change removes the code in the Telephony service that would have asked the default SMS app to show UI. Bug: 11084719 Provide UI for "quick response" messages built into Phone app Change-Id: I7fcf20280fd3b741aa941cc6a24f5c262db1899b
2013-09-23Add generic error code dialogs for failed calls.Santos Cordon
This change listens for disconnected calls and if the disconnection cause matches a set of predefined causes, we show a dialog to the user. New dialog messages: - You can\'t make outgoing calls while call barring is on. - All calls are restricted by access control. - Emergency calls are restricted by access control. - Normal calls are restricted by access control. - Outgoing calls are restricted by FDN. Several changes were necessary to support this: 1) Dialog code (InCallActivity.java) 2) Notifications for a new disconnect (CallList.java) - previously we sent a large update for ondisconnect, now we just send the notice for that particular call. InCallPresenter was written so that the same thing that used to happen still happens. 3) Check if we need to show a disconnect dialog when the UI comes up. - I found that FDN disconnection happens so quickly that the disconnect came before the UI was up, so this was necessary. (InCallPresenter.setActivity()) 4) CallCard should be initialized with disconnecting/disconnecting calls. - Call Card presenter intializes itself when it starts up using live calls, but as with the FDN case above, a disconnected call should be used if no live calls exist. (CallList.getFirstCall()) 5) If a dialog is up while an incoming call comes up, dismiss it automatically so that users can see incoming UI. - (InCallPresenter.startOrFinishUi()) 6) Keep the UI up as long as there is a dialog for the incoming call. - Previously, UI would come down once all calls were shut down but in the case of present dialogs, we want it to stay up. (InCallActivity.finish()) - When the dialog is dismissed, check if we want to tear down UI. (InCallActivity.onDialogDismissed()) 7) Only tear down UI once we are in the NO_CALL state. - We used to tear down when the activity was null (closed) and the service was disconnected. This is problematic because a call that immediately disconnects (like FDN errors) would shut down the service before the UI had a chance to come up. We added a check to the conditional for the state NO_CALL before shutting down. (InCallPresenter.attemptCleanup()). bug: 10680210 Change-Id: I1fd33dd53dc0eec5a02b7a940cfd018cec3d20c0
2013-09-10Adds onUiReady and onUiUnready to the presenterChristine Chen
- ConferenceManagerPresenter needs these two functions to listen to CallList changes. - Moves super.onUiUnready() to the top of the onUiUnready methods for both the AnswerPresenter and ConferenceManagerPresenter classes. Bug: 10696097 Change-Id: I050071f10ebe5112d9d41192ea8c78593189bd9b
2013-09-10Makes glowpad scalable.Christine Chen
Bug: 10634748 Change-Id: Iac3d424e7d6be94230da12f3058214b7ca3d8a84
2013-09-09Improve lifecycle ordering for InCallUISantos Cordon
This CL rearranges startup and teardown of InCallUI to reduce the number of race conditions resulting in runtime exceptions and app crashes. At a high level this CL fixes the following: - TeleService should be able to unbind and rebind at any time without causing problems in the UI. (Fixes to InCallPresenter) - On weird occasions we were seeing secondary UIs pop up if we rebound while the older UI was still up and one of the UIs would be orphaned on the foreground. - call notifications can be sent during (1) activity startup, (2) activity lifetime, (3) activity destruction, (4) no activity...and nothing should crash. - Lots of crashes when notifications came during destruction and startup. (Fixed setup in InCallActivity + presenters, and startup/teardown ordering in InCallPresenter) Details: (1) InCallPresenter handed out instances of member classes to the UI classes, but upon unbinding and rebinding, the classes were recreated. This meant that the activity which was potentially still up had stale versions of AudioModeProvider and ProximitySensor. - Classes created/used by CallHandlerService are now singletons so that they do not change from one bind to the other. If the service tries to initialize InCallPresenter while the activity is still up (and so we haven't yet torn down) we reuse the reuse the previous initialization since there is no need to recreate them, and classes in the Activity dont ever become stale. (2) We were recreating new copies of InCallActivity on updates that occur while tearing down the previous activity. This caused weird errors where second emptier activities were up after all calls ended. - Solution to this was to ignore all updates while we are finishing the activity. When the activity is finally finished, we check if we should bring up a new activity in case some update came while we were finishing. (3) We set listeners on presenters from a parent class that wasn't aware of UI transitions. - All Presenters are not responsible for setting and unsetting their listeners. This allows them to unset them before their UI goes away. + renamed HIDDEN to NO_CALLS as hidden was confusing to developers which associated the term with foreground/backgroundness of the app. + Improved some logging bug:10573125 Change-Id: I2d1af6a6e972b3b3bd93af839054e879f0b74b4f
2013-09-05Adds UI null check.Christine Chen
- Fixes NullPointerException that happens sometimes when the UI is asked to bring up the reject with text message popup. Bug: 10608694 Change-Id: I32b8d9f0e1c115dd07ec6000275a882a4b9e1316
2013-09-04Merge "Clean up listeners when view is destroyed." into klp-devChiao Cheng
2013-08-30Enable reject via textYorke Lee
Toggle reject via text option in glowpad based on the call's capability. Bug: 10424370 Change-Id: I5c36e83bc36923b093021c2a5cfd0c6aad3eb0b2
2013-08-30Clean up listeners when view is destroyed.Chiao Cheng
When the answer screen is shown and destroyed with a back button and then re-shown via notifications, a new AnswerPresenter is created. But the old presenter has not been removed as a listener. Bug: 10566547 Change-Id: I68c621fee81017fa5d0e3e9dde56fabedc3b1d8d
2013-08-29Show glowpad for call waiting callsSantos Cordon
Two things were happening: 1. AnswerPresenter stopped listening to call event after the first incoming call 2. It was not checking for CALL_WAITING && INCOMING as valid incoming call states. fix both. bug: 10538445 Change-Id: I491f2381c33c431f0cbfcc0000f50efdc107cce9
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-23Disabling quick response since it's not done yet.Chiao Cheng
Feature is incomplete. Ui needs to handle case where there are no text responses and switch to 2 targets. Bug: 10424370 Change-Id: Iae59ec0adeea6131374a61abe05031eb29da9ca4
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-08Fix race-condition case.Santos Cordon
Hitting a button when the call just disconnected can cause mCall = null. Protect against it instead of throwing exception. Change-Id: I529579b43746c7611bad1209fe4d19a355ae6203
2013-08-07Adds support for text messagesChristine Chen
Change-Id: Ibdb279a7dff0db710bcc1d6a313b486f6816ea65
2013-08-05Use rejectCall() for rejecting call.Santos Cordon
Was previously using non-functional disconnectCall(). Change-Id: I14f17290f74434dfb85a7671374d1b6070595394
2013-08-05Adding a central logging class.Santos Cordon
Change-Id: I24f68d5ebcfed2740f9645736c35edf17efb4769
2013-08-05Improve InCall State managementSantos Cordon
CL Contains the following changes: - InCallPresenter now manages an overall in-call state - Other presenters now listen to in-call state changes instead of getting updates from CallList directly. - Changes AnswerPresenter to a static fragment instead of dynamically loading it. It makes code easier and more aligned with other fragments used in the class. - Presenters now save the appropriate call and use callId() for commands sent to the telephony layer. - Extra logging in CallList - cleaned up the startup sequence in InCallActivity and moved everything to onCreate instead of onCreate & onResume Change-Id: I4ce4182eefcc134bfa16c33be8fe4aefc041f563
2013-08-03Fixing incoming call sequence, adding InCallPresenterSantos Cordon
Moved handling of AnswerWidget from AnswerPresenter and into the new InCallPresenter class. InCallPresenter now also manages a high-level in-call UI state to be expanded in subsequent CLs. Change-Id: Ia4fee84db68f7eaedea307b25329dadb8cf754e5
2013-08-01Adding multi-call support.Santos Cordon
Before this change, the UI came up when we were notified that a new call came in, but we did not actually look at the call state, etc. This seemingly worked while we only supported single calls but did not scale. This change does two main things: a) Plugs in CallList into the presenters so that they can perform their logic based on the actual state of the calls (necessary for multi-call support) b) Adds Secondary CallInfo UI to the Call Card so that we can display information foreground and background calls. As a result of (a) from above, a lot of changes you see will be to Presenters, which now take their cues from CallList and update their Ui's accordingly. A problem with this approach is that the presenters (callcard/buttons/answer-widget) perform their changes independently. A subsequent change will consolidate interactions with CallList to a Presenter-Manager class and away from the presenters. Change-Id: I89d1926fa1eef6f10d897d2ce360f666c8f341f8
2013-07-24Renaming client side stub of ICallCommandService.Chiao Cheng
Since the server side already has a class named CallCommandService, renaming client side to be CallCommandClient to avoid confusion. Change-Id: If8aa1741e45a97b11e6699746a3561227900f792
2013-07-24Integrating mute and speaker buttons.Chiao Cheng
* Adding base classes for presenter, ui and fragments. * Moved common presenter integration logic into base fragment. * Adding presenter to handle button logic. * Integrated disconnect and text from glowpad to presenter. * Changed in-call buttons to be invisible so they do not show under transparent glowpad. Change-Id: I446db149769b5cf1abce960ecede01effeabfe1e
2013-07-22Adding singleton wrapper for ICallCommandService.Chiao Cheng
Change-Id: I1ab36019f4d754ba9bca5a4d24f6292b91f60d18
2013-07-19Renaming CallMonitorService to CallHandlerServiceSantos Cordon
Change-Id: I936341bbad768cc718e27faaef20b498479f0e28
2013-07-19Connecting answer call action in UI to service.Chiao Cheng
Also starting pinging animation for glow pad. Change-Id: Ifac94582b8448c288a07577db02633bf9452ee56
2013-07-18Adding fragment and listener for answering calls.Chiao Cheng
Created mvp pattern for answer fragment. Change-Id: Ibe0c3b5ce2b61a098c2237aab549238fd4518e9b