Skip to content

feat(timer): add choice between pausing and stopping media on expiry#49

Open
Xitee1 wants to merge 1 commit into
mainfrom
feat/media-end-action
Open

feat(timer): add choice between pausing and stopping media on expiry#49
Xitee1 wants to merge 1 commit into
mainfrom
feat/media-end-action

Conversation

@Xitee1

@Xitee1 Xitee1 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a setting to choose what happens to media playback when the timer expires: Pause (the previous, still-default behavior) or Stop.

  • New MediaEndAction enum (Pause/Stop) in core:data, persisted via DataStore as media_end_action, defaulting to Pause so existing users see no behavior change.
  • MediaVolumeController.fadeOutAndPausefadeOutAndEndPlayback(durationSeconds, endAction): after the fade-out it dispatches KEYCODE_MEDIA_PAUSE or KEYCODE_MEDIA_STOP depending on the setting. The fade logic itself is unchanged.
  • Settings UI: a "Pause or stop" picker row directly under the Playback toggle, showing the current selection in the description slot and opening a two-option dialog — same pattern as the auto-rotate mode picker. Strings added in en and de.

Note on semantics: KEYCODE_MEDIA_STOP is 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

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>
@Xitee1

Xitee1 commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

Doesn't work, in stop mode the music starts playing again just a after it has stopped/faded out

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