feat(timer): add choice between pausing and stopping media on expiry#49
Open
Xitee1 wants to merge 1 commit into
Open
feat(timer): add choice between pausing and stopping media on expiry#49Xitee1 wants to merge 1 commit into
Xitee1 wants to merge 1 commit into
Conversation
New MediaEndAction setting (default: Pause, the previous behavior) selects whether the post-fade media key event is KEYCODE_MEDIA_PAUSE or KEYCODE_MEDIA_STOP. Exposed as a picker row under the Playback toggle, following the auto-rotate mode dialog pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Doesn't work, in stop mode the music starts playing again just a after it has stopped/faded out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a setting to choose what happens to media playback when the timer expires: Pause (the previous, still-default behavior) or Stop.
MediaEndActionenum (Pause/Stop) incore:data, persisted via DataStore asmedia_end_action, defaulting toPauseso existing users see no behavior change.MediaVolumeController.fadeOutAndPause→fadeOutAndEndPlayback(durationSeconds, endAction): after the fade-out it dispatchesKEYCODE_MEDIA_PAUSEorKEYCODE_MEDIA_STOPdepending on the setting. The fade logic itself is unchanged.enandde.Note on semantics:
KEYCODE_MEDIA_STOPis delivered to the active media session like pause, but its interpretation is player-dependent — most apps end the session and dismiss their media notification; a few treat it identically to pause.Testing
./gradlew assembleDebug— passes./gradlew lint— passes🤖 Generated with Claude Code