Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various issues related to music player service #397

Merged
merged 4 commits into from
Apr 16, 2019

Conversation

marverenic
Copy link
Collaborator

This fixes #162533648 as well as a few other miscellaneous issues related to communication between the player service and UI procress.

Testing Steps

In order of commit, the following changes have been made.

Reduction in the number of unexpected notifications from the service

There was a logic issue that would cause the playback notification to appear when Jockey was not in the foreground or had not yet begun to play music in this app session. This should reduce the frequency of unexpected playback notifications.

The playback notification gets stuck in the foreground state

On devices running Android Oreo and higher, there are changes to background execution limits that may cause the playback notification to get stuck in the playing state, leaving an playback notification that could not be dismissed.

To reproduce, play music without opening the app. You can do this by using a pair of headphones with an inline remote or with a bluetooth stereo that has media controls. Then, pause music. Music will stop playing, but the notification will not be updated and cannot be dismissed. Tapping the pause button will actually play music. Tapping the pause button in the notification will not cause this behavior and could be used to dismiss the notification.

The playback service may crash silently

There were a few fatal exceptions that were causing the player service to crash, but a user-facing alert was not shown because the app was not in the foreground. To reproduce, enable "Always Show Crash Dialog" in the developer settings (under "Apps" at the bottom of the list). This PR fixes crash dialogs that would appear after dismissing the playback notification.

Jockey would not correctly show the seek progress on app launch

This is actually a UI error, but it's a small change that I'm lumping it with these other issues. When launching Jockey from a cold start, it will now display the correct seek progress for the current song in the now playing toolbar at the bottom of the screen based on wherever playback was left off in the previous session. Previously, this seek bar would always indicate the song was starting from the beginning until the playback state changed.

@marverenic marverenic merged commit dc7986f into master Apr 16, 2019
@marverenic marverenic deleted the m/service-bugfixes branch April 16, 2019 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants