fix(widget): standardize alarm interval to 10 minutes and document updatePeriodMillis limitation#20481
Closed
MandeepT19 wants to merge 1 commit intoankidroid:mainfrom
Closed
fix(widget): standardize alarm interval to 10 minutes and document updatePeriodMillis limitation#20481MandeepT19 wants to merge 1 commit intoankidroid:mainfrom
MandeepT19 wants to merge 1 commit intoankidroid:mainfrom
Conversation
…datePeriodMillis limitation
Member
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.
Problem: In widget_provider_deck_picker.xml line 11, a TODO comment suggests using updatePeriodMillis for simpler updates. However the actual implementation in WidgetAlarm.kt runs every 1 minute, contradicting the TODO's intended 10 minute interval.
Investigation: Research into updatePeriodMillis revealed a minimum enforced value of 30 minutes by Android. For a widget displaying due card counts, a 30-minute update interval is too infrequent — users glance at the home screen throughout the day and need accurate card counts. Additionally, the current 1-minute interval causes unnecessary battery drain. Standardizing to 10 minutes aligns with the original TODO intent while balancing accuracy and battery efficiency.
Fix: Updated WidgetAlarm.kt — changed interval from 1 minute to 10 minutes at 2 occurrences. Updated TODO comment in widget_provider_deck_picker.xml and widget_provider_card_analysis.xml with explanation of why updatePeriodMillis was not used.
Testing: The build was successfully running and there were no errors found after doing the change in the code
Addresses TODO comment in widget_provider_deck_picker.xml line 11