feat: add Quick Settings tile to start timer with last used duration#51
Open
Xitee1 wants to merge 1 commit into
Open
feat: add Quick Settings tile to start timer with last used duration#51Xitee1 wants to merge 1 commit into
Xitee1 wants to merge 1 commit into
Conversation
Adds a Quick Settings tile that starts the sleep timer with the persisted preset (the last dial-committed duration) directly from the QS panel, without opening the app. While a timer is running the tile shows the remaining minutes and a tap cancels it, mirroring the notification's Cancel action. The tile observes the in-process TimerRepository StateFlow while the panel is open, so it stays in sync with the foreground service tick. Tile strings are localized in both en and de. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4QRUoCmfQgD6xgUE9Phn
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 an Android Quick Settings tile that starts the sleep timer with the last used duration directly from the QS panel, without opening the app.
SleepTimerTileService(:app, next to the other platform entry points): a Hilt-injectedTileServicethat dispatches the existingACTION_START/ACTION_CANCELservice contract.UserSettings.presetMinutes, which the dial already writes on every commit — no new state or setting needed.startForegroundService.TimerRepositoryStateFlow); tap cancels, mirroring the notification's Cancel action.stopSelf— noForegroundServiceDidNotStartInTimeException.values/andvalues-de/.Testing
assembleDebug+lint) verifies the build — no Android SDK was available in the sandbox for a local build.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kk4QRUoCmfQgD6xgUE9Phn
Generated by Claude Code