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

Changed rewind/fast forward button actions so holding will skip tracks #940

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from

Conversation

KBerstene
Copy link
Contributor

When in the Now Playing fragment, holding the previous/next button will enable an auto-repeating rewind/fast forward action until the button is released. However, holding the rewind/fast forward buttons will not do anything, it will just do a normal rewind/fast forward action when the press is released.

I have changed the actions so that the rewind/fast forward buttons are better "mirrors" of the previous/next buttons--that is, holding the rewind button will call the previous track action, just as holding the previous button will call the rewind action (and the same for next/FF). I didn't keep the auto-repeating functionality for this, since holding to skip tracks is odd and could be unexpected behavior. Instead, a simple long-press triggers the action, instead of the auto-repeat touch event.

This change also fully separates the rewind/fast forward actions from the next/previous actions. In the current version, the next/previous action would check to see if rewind/fast forward should be called. This can cause unexpected behavior. If I press the "next" button (in multiple contexts, whether in the app itself, on the widget, notification, or Auto controls), I would expect the next song to play, and not the song to simply fast forward. I understand that this check was in there due to rewind/fast forward buttons not showing up in different contexts - I am working on another commit for the home screen widget and for Android Auto. GlennGuy's excellent MediaStyle notifications are already behaving properly with rewind/fast forward button appearances, though that pull request has not been accepted yet. If for some reason it is not accepted, I can work on notifications as well.

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.

1 participant