summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java
AgeCommit message (Collapse)Author
2016-03-22Clear voicemail status text when loading succeededTa-wei Yen
In ag/874775, mStateText.setText(null) is removed from VoicemailPlaybackLayout#setClipPosition(). This caused the error in mStateText not to be cleared after the voicemail is sucessfully loaded. This CL adds a setSuccess() method to the layout that clears the message, which will be called from onPrepared() once the voicemail is loaded. Fixes:27770842 Change-Id: Ic42e40b99d36f817532dec780b63311c1967300c
2016-03-17Merge "Add missing lock discovered by GuardedBy checker."Ian Rogers
am: a2ee440 * commit 'a2ee44082c21014d3be1163ca362a556b5db30cc': Add missing lock discovered by GuardedBy checker.
2016-03-16Add missing lock discovered by GuardedBy checker.Ian Rogers
Found by error prone. Change-Id: I8923c4e7095e644b8e09841ebda1911e6589b4e0
2016-03-13Add share voicemail functionality.Sarmad Hashmi
+Send intent to other applications with temporary file permission granted +Add voicemails folder to FileProvider paths +When creating file in VoicemailArchiveProvider, append extension to file name +Check voicemail content exists before archiving it +Refactor voicemail code +Add tests for checking file extension +Add tests for archiving and sharing vociemails +Archive tab should not archive on share button press BUG=22798485 Change-Id: Id8068aba92f7f1ca58532dca6c405cb2908841a3
2016-03-11Add share button to voicemail cards.Sarmad Hashmi
+Add share icon and string +Added share button to voicemail_playback_layout.xml +Link to icon: https://icons.googleplex.com/#icon=ic_share BUG=22798485 Change-Id: Iab9051f4824a4fa0eed90049a762aaac032cf3bf
2016-03-04Disable voicemail archive by default.Sarmad Hashmi
+Archive-specific actions are not drawn unless the runtime flag is enabled +Disable archive button and menu item BUG=27375884 Change-Id: Ide7d0a162468279f614e09e01de99d782854a3e1
2016-03-03Add files for voicemail archive tab.Sarmad Hashmi
+ Added VoicemailArchiveActivity which displays all voicemails archived by the user + VoicemailArchivePlaybackPresenter is the same as VoicemailPlaybackPresenter except that it does not need to request content from the voicemail server +Added tests (combined common methods and attributes for regular voicemail tab and voicemail archive used for tests) BUG=22797391 Change-Id: I4064eea945b9e257ec6c7ada35cf5ac1657dc866
2016-03-02Update seek position by using volume rocker in talkback mode.Qi Wang
Bug: 25452893 Change-Id: Iae3b0a2c2db4642d7cebc74c3ae47f5ab7ad7bc2
2015-11-03Reset voicemail playback state on special expand action.Nancy Chen
The accessibilty delegate automatically expands the call log cards when the card is in focus. However, the voicemail state was not being reset when this happened. Make sure to reset the voicemail playback state when expanding the card in this manner. Bug: 24105523 Change-Id: Ife7535980566d7b62959767d7b72df779d275270
2015-10-19Set snackbar action text to blue.Andrew Lee
Done for both snackbars in call blocking/unblocking and voicemail deletion. Bug: 24370325 Change-Id: I00fdebb635e60ac1d421ccf7f15df46693773870
2015-09-18Merge "Resume voicemail playback at previous position on resume." into ↵Nancy Chen
ub-contactsdialer-a-dev
2015-09-17Re-enable "start" button if loading voicemail fails.Nancy Chen
An enabled "start" button is a cue to the user that they can re-attempt downloading voicemail manually if the first attempt fails. Bug: 23899613 Change-Id: Ie5baf6cf45c48d0f1988d01dbed3e31919510869
2015-09-17Resume voicemail playback at previous position on resume.Nancy Chen
Make sure that the position is saved when navigating away from the voicemail playback so that it can be restored when resuming. Also: - Disable seekbar when not loaded - Gray out seekbar handle when seek is disabled Bug: 23566924 Change-Id: Ic9d84425d7a3cde9d212bd758eb518577161d7ec
2015-09-17Display duration and prepare voicemail if voicemail is downloaded.Nancy Chen
We should always know what the duration of the voicemail is even before it is downloaded. As such, when a voicemail is expanded, set the voicemail duration. For a downloaded voicemail, we can go even further and prepare the audio file when the card is expanded. This means the voicemail can be played immediately when the user clicks "play" instead of having to wait for the media player to buffer each time. Bug: 23566924 Change-Id: I0ce7570eab72b0bf079d3eb8cd10b71981576a9f
2015-09-15Fix VoicemailPlaybackTests.Andrew Lee
There appears to be two issues which were borking this, although I'm not sure why there was the change (maybe it's been around a long time). A single instance of presenter is retained over time, which is no good for our case where we're creating different FakeAsyncTaskExecutors each time, so added a method for testing where we can clear the instance. Secondly, the method checking the text views didn't work anymore. Not sure why, but I added a hook into the state text so the tests can continue to check for that. Bug: 23640774 Change-Id: Ie729627f3bb4ee08476d5ad0198e43cfea72ce5c
2015-09-10Improve speakerphone setting.Andrew Lee
+ Persist speakerphone setting across resume/pause. + Allow toggling speakerphone before voicemail is played or while loading. Bug: 23566924 Bug: 23716100 Change-Id: Icc7342be85bd6df0f4678134b222f2200d3fc56d
2015-08-27Only show loading text when downloading VM.Andrew Lee
In other cases (eg. buffering), just load without showing the text, since it will likely appear only for a very short time, and give the appearance of flickering. Bug: 22333980 Change-Id: Ic2bbba7a2127654aaf12546b177c465c9311ddc1
2015-08-26Merge "Populate TextViews with 00:00 after inflation."Andrew Lee
2015-08-26Populate TextViews with 00:00 after inflation.Andrew Lee
But, set them to INVISIBLE, so they layout, but don't appear. This prevents jank caused by the seekbar resizing later on when times are set for the first time. Bug: 22333980 Change-Id: I8523659b837008bae1789c1beaccc7edf9c15554
2015-08-19Show snackbar to undo last deleted voicemail.Nancy Chen
Snackbar will appear for 3 seconds during which the user can undo the last deletion. The way it works is the snackbar appears for 3 seconds and a delayed callback is set for 3 seconds after which the voicemail is permanently deleted from the database. If a second (or third or fourth) voicemail is deleted subsequently, the previous voicemails that were waiting for the undo timeout are deleted immediately. Bug: 22460745 Change-Id: I84b70994275975e4e3020321884d382cc87098dc
2015-07-24Merge "Set correct view to display playback error text" into mnc-devYorke Lee
2015-07-22Set correct view to display playback error textYorke Lee
Bug: 22642715 Change-Id: I01c8c8a7ec3dfa132c0aad37fe847fd58daae516
2015-07-20Don't auto expand next voicemail after deletingYorke Lee
Pipe onVoicemailDeleted notification through to CallLogAdapter. Reset expanded position when that happens. Bug: 22534894 Change-Id: Iec69082bd8b3259f500b523da6d0710bece69fa4
2015-07-15Pause playback when voicemail is deleted.Nancy Chen
We don't want the voicemail to continue playing after deleted, so perform the pause behavior when the delete button is pressed. Bug: 22462516 Change-Id: I664c5aed0c2bd1910cdf1f20a33c0117dde8d0cc
2015-07-08Fix some voicemail playback bugsYorke Lee
* Don't fetch voicemail until playback is started * Prevent multiple voicemail fetches for the same voicemail * Fixed an issue where the seekbar would be stuck in the same position even after seeking * Fix for playback position getting reset after the voicemail view is scrolled out of view and back in * Respect the invariant that if mMediaPlayer is null, mPrepared is always false. This fixes potential NPEs when resuming playback. Bug: 22127956 Bug: 22333494 Change-Id: I5c419424950c0e21317cbd133ca6f7e1edd9fd31
2015-06-25Revise layout/style of VoicemailPlaybackLayout.Andrew Lee
- Delete now-unused old icons. + Add new material icons for voicemail playback. + Rearrange buttons, padding/spacing. + Change ripple feedback when pressing button. + Use different text fields for total duration and state labels. Bug: 22070564 Change-Id: Ibc9b9908154ac0a846f828bb9707a61ab15f8ba5
2015-06-19Rewrite of MediaPlayer logic.Andrew Lee
+ Control MediaPlayer instance more tightly. Wait until prepareContent to initialize instance. Release MediaPlayer when it is no longer needed. + Instead of using isFinishing, check explicitly for orientation change to know whether to release MediaPlayer. + Change Presenter to singleton, to address audio change wonkiness. + Only create a Presenter if the call log fragment shows voicemail. + ... fixing a variety of cases. - Temporarily disable proximity sensor until blocking issue is fixed. Bug: 21856243 Change-Id: Ic06e98bb5278467c3cce726a06b6cf3d855861a2
2015-06-12Don't pass media player to VM playback layout.Andrew Lee
Better to ask the presenter, where it can check if the media player is in the appropriate prepared state. Bug: 21765119 Change-Id: Ieeade86900da1eb0ed9407bea17a7fc6219b3ad2
2015-06-05Add delete action to voicemail in call log.Andrew Lee
+ Cleanup some asset and variable naming. Bug: 21239168 Change-Id: I4c99484bee1fcd300857cf44080c38e19a98cb5a
2015-06-03Move VM playback from details to call log.Andrew Lee
- Delete voicemail playback in the CallDetailActivity. + Add voicemail playback to the call log list items. + Move the VoicemailPlaybackPresenter to the CallLogFragment. + Fix some retaining state for both call log (expanded items), and preserve rotation/state functionality for voicemail playback. This included some changes to the Presenter logic. + Fix some tests. Bug: 21471763 Bug: 21170557 Change-Id: I30aae3a52c5bbf74a5075a9666343c337b1fc0df
2015-05-27Refactor Voicemail Playback into standalone view.Andrew Lee
+ Substitutes the existing playback widget in CallDetailActivity, although the plan is to move this to the call log shortly. + Convert the widget from a fragment into a layout. This allows us to more easily create multiple instances of the voicemail widget in the same view, as we intend to do in the call log. + Shift UI-related logic from Presenter to the Layout. + Fix janky seeking, so that it now works correctly consistently rather than sporadically, and doesn't need to buffer again. - Remove the VariableSpeed player formerly used in the Presenter. We don't use this functionality anymore, and this allows us to directly used the framework MediaPlayer (instead of a custom legacy proxy). Bug: 21170557 Bug: 20693172 Change-Id: Ia34f459df10e43763b32fdb0954f83e882664231