Repository navigation
Stop ringing when a dose is marked on Today; warn when full-screen alarms are off #31
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
Merged
+53
−1
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: SusieeTheLinuxUser/dosekeeper
Length of output: 12414
Script executed:
Repository: SusieeTheLinuxUser/dosekeeper
Length of output: 6121
Stop a dose that is queued to ring but not yet in
ringing.cancelFallbacksendsACTION_STOPonly when the dose is already inringing.AlarmReceiver.onReceivestartsACTION_RINGbeforestartRingingadds the dose toringing. If Today marks the dose taken or skipped in that window, no stop is sent.startRinginghas no status check, so the dose can start ringing after it was dealt with. Cancelling the scheduled alarm does not retract the delivered broadcast or the queued service start.The fix must cover this window. Record the dismissal for the dose, check it in
startRinging, and clear it when the dose is no longer pending. The change should stay inAlarmService.kt. Do not add a stop-only check, because the stop arrives before the ring is processed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping. The window is between AlarmReceiver starting the service and onStartCommand running, both on the main looper, so a few milliseconds. The user would have to tap Taken on Today at that exact moment. If it happens, the alarm screen just asks about a dose already marked. That's harmless, and a persisted dismissal set isn't worth adding for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SusieeTheLinuxUser Understood. You accept the risk of an alarm starting after the dose is marked. I won’t pursue the dismissal-set change.
Learnings used
You are interacting with an AI system.