summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/eleven/MusicPlaybackService.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix MediaSession queue handling.Danny Baumann2016-10-311-24/+16
| | | | | | | | | - Go back to using the queue position instead of the track ID as queue item ID, as the track ID can be present multiple times in the queue and the queue item ID is supposed to be unique in the whole queue - Make sure no null items are passed in Change-Id: I9390ab8c7a5a20f2a2bb1efad02e460ecf7dc2e5
* Merge "eleven: Add support for the MediaSession queue" into cm-13.0Steve Kondik2016-10-091-1/+103
|\
| * eleven: Add support for the MediaSession queueSteve Kondik2016-10-071-1/+103
| | | | | | | | | | | | | | * This allows remote controls to view the contents of the queue and select the active track based on the queue id. Change-Id: I205225864d10044ef60c3fe2bc877525c437d506
* | Eleven: Correctly set shake to playSean Maas2016-10-071-1/+1
|/ | | | | | Oops, this is disabled by default. Change-Id: Ifc30a1311c3f0c3665f3296c1247822ffe7f81e6
* Merge "Eleven: Set preferences on play" into cm-13.0Michael Bestas2016-10-041-0/+5
|\
| * Eleven: Set preferences on playSean Maas2016-09-301-0/+5
| | | | | | | | | | | | | | | | | | The shake to play and lockscreen album art settings were not being set when playback started without the app, ex. with a headphone button. This caused them both to be set to false until the app was opened. Change-Id: Id15c134e9001bba62faa04266726c1e10fbfb9dd
* | Avoid NPEMarcos Marado2016-09-231-1/+2
|/ | | | Change-Id: Ib6a44e2f2ee023992ce3539a9aa1b7ed0be9d3ef
* eleven: Runtime permissionsSteve Kondik2016-09-111-13/+33
| | | | | | | | * Add prompting for storage permissions in order to bump the API level up to level 23. Change-Id: Id3fc4ee06fe3534b2f94408e96a8163f4fae8f98 (cherry picked from commit da1629dce3bf475957a53df89e25ad0af0de61dd)
* Handle headset hook multi click in playback service.Danny Baumann2016-08-191-7/+85
| | | | | | | | | We usually get media button events via the session callback now, so only handling those events in the button receiver (which is only triggered if e.g. media buttons are pressed without us running after reboot) is not sufficient. Change-Id: I50ff266af826edd016804b267323effe1056f045
* Convert to new media button receiver logic.Danny Baumann2016-08-151-10/+10
| | | | | | | | | | | | Commit Ide906efdf90a6f42f3fcb6c5386328301165cb7c changed the media button receiving logic to be routed through MediaSession, but missed to also convert the media button intent receiver registration used for receiving button events if our playback is stopped. Also add the possible stop action (we're handling onStop after all) missing in the aforementioned commit. Change-Id: Idd4b8bc00f58eee2ff7fc2e5a685b7918988c37c
* handle media keysShaleen Jain2016-07-171-1/+10
| | | | | | | This lets Eleven respond to physical media keys on some devices as well as when the volumn buttons are long pressed when the screen is off and the 'Playback control' preference is true in settings. Change-Id: Ide906efdf90a6f42f3fcb6c5386328301165cb7c
* Eleven: Remove wakelockmyfluxi2015-12-231-32/+5
| | | | | | | We do not need this, let the device sleep during (offloaded) playback. Change-Id: I596b480a6361745b96b547c93f1d5433e18069e0
* Merge "Eleven: Show/Hide album art on lockscreen" into cm-12.1Abhisek Devkota2015-04-201-1/+23
|\
| * Eleven: Show/Hide album art on lockscreenMikalacki Sava2015-04-171-1/+23
| | | | | | | | | | | | Added preference option to show/hide album art on lockscreen. Change-Id: Iea2173288fc279f15abe6675a0ffd582e35ad321
* | Eleven: properly send open/close session eventsRoman Birg2015-04-201-4/+11
|/ | | | | | | | These were being fired off at device boot and there was a session being held for the entire duration. Only request the session when playing. Change-Id: I37ebc5a6898453dd090cc68ee2126e9c5d08d892 Signed-off-by: Roman Birg <roman@cyngn.com>
* Eleven: shake to play next song, only available while music is playing.stable/cm-12.0-YNG1IMikalacki Sava2015-02-231-0/+82
| | | | | | | | Allows user to shake his device to switch to next song. This feature is available through settings and is invoked only while music is playing. Change-Id: Ifb0866565d49443af7f3ac679e80601660506515
* Eleven: Show error message for corrupt tracks (additional codepaths)linus_lee2014-12-271-17/+30
| | | | | | | | | | Add showing error message for code paths where the media player fails gracefully Unfortunately adding the logic to remove the bad track is not trivial because the removeTracks logic automatically does other things to try to go to the next track. For now I will leave the logic so that it goes on to the next track and make a note on the music service rewrite notes to cover this scenario as well. Change-Id: Ib7ae5ce7819b15cdb3ada4995bc0734ab2d9b0a2
* Eleven: Make sure we have vibrant colors for all default colorslinus_lee2014-12-201-33/+14
| | | | Change-Id: I4be163e75fc35d3b139439c504d769d17d980ace
* Eleven: Add missing metadata keys for Avrcp.solk22014-12-191-0/+32
| | | | Change-Id: I7201838cf65b6b1edcf2aee0284e31bdafaf42ca
* Improve notification UX.Danny Baumann2014-12-191-32/+63
| | | | | | | | | | | | - Add a proper notification icon (courtesy of Joey Rizzoli) - Use separate notification modes to allow the user to dismiss the notification when music isn't playing. - Always show notification regardless whether an activity is in foreground to ensure the notification doesn't pop up out of the blue when ending playback inside the app and leaving it afterwards. - Keep notification timestamp constant when updating it Change-Id: I2fa9a56ff31ab2874d6d96786e6b80695397702b
* Eleven: Remove tracks that give problems from the queue and warnlinus_lee2014-12-161-5/+40
| | | | | | | Instead of playing the tracks over and over, remove it from the queue Also pop up a warning if the music player is active Change-Id: I1d4e5a049b69de381f1a7f86ce2b837449bc378f
* Merge "Eleven: Fix crash when launching a song from file manager" into cm-12.0Rajesh Yengisetty2014-12-131-85/+87
|\
| * Eleven: Fix crash when launching a song from file managerlinus_lee2014-12-111-85/+87
| | | | | | | | | | | | | | There are some asycnhronous issues with interacting the service This should protect it a bit better and fixes the crash for me Change-Id: Ib50be1ca50badb83e8c206e01362a3971d050c1f
* | Update Notification background colorAndrew Neal2014-12-121-5/+27
| | | | | | | | | | | | | | | | | | This change uses Palette to update Apollo's Notification background color based on the current artwork. It also removes the timestamp from the Notification. Change-Id: I6a292839c223bf9d165e9c90724194eae6ca343c
* | ELeven: Show notifications only when outside music app and have a linger timerlinus_lee2014-12-121-16/+38
|/ | | | | | | If you played music recently and leave the app it'll still show the notification now for up to 5 minutes Change-Id: I530c548bd4e3b8cf458341b068d78b54f1528b2c
* Eleven: Fix exception when leaving Eleven with nothing in the queuelinus_lee2014-12-111-6/+9
| | | | | | | | It is possible for things to post to a handler even after the service has been destroyed Fix is to shutdown the handlerthread in the onDestroy Also set the subtitle text to alpha of 0 to not show on first launch Change-Id: I76b5f4c4bc8a114660ced042ab02089bf279accb
* Use L's new notification and media session API.Danny Baumann2014-12-101-84/+114
| | | | Change-Id: Ic9e7facdfa7213439b168a915ac9f2e8afc0a252
* Update Eleven headers and namespace for open sourcelinus_lee2014-12-091-0/+3459
Change-Id: I82caf2ebf991998e67f546ff2ac7eaf2b30dc6be