improved app startup and handled user notification#20486
Closed
rudrat0319 wants to merge 1 commit intoankidroid:mainfrom
Closed
improved app startup and handled user notification#20486rudrat0319 wants to merge 1 commit intoankidroid:mainfrom
rudrat0319 wants to merge 1 commit intoankidroid:mainfrom
Conversation
…p will notify users as I've wrapped AlarmManagerService call in try-catch in AnkiDroidApp.kt
Contributor
|
Important Maintainers: This PR contains Strings changes
|
Member
This PR isn't close to what was expected. Sorry. |
Author
|
@david-allison I understand I might have mistaken or misunderstood what was supposed to be implemented. If you can help me understand better I can fix it and submit another PR. else, no issues. |
Member
|
No worries, I'll take it on when I have time |
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.
Purpose / Description
Closes: #20168
Parent issue: #19552
When a component fails to initialize during app startup, the failure was previously silent. The app would continue loading but the affected feature would be unavailable with no notification to the user or developer.
The specific case that motivated this change is the ReviewReminder deserialization failure (#20163), where a missing
onlyNotifyIfNoReviewsfield caused AlarmManagerService.scheduleAllNotifications() to fail silently.Changes
AnkiDroidApp.kt
NonFatalInitializationErrordata class to represent arecoverable startup failure, holding the component name and exception
nonFatalStartupErrorslist to collect failures during onCreate()AlarmManagerService.scheduleAllNotifications()in atry-catch block so a ReviewReminder deserialization failure no longer
silently breaks the notification system
nonFatalStartupErrorsvia companion object for DeckPickerto read after startup completes
DeckPicker.kt
showNonFatalStartupErrors()function called at the end ofonCreate(), after the UI is fully ready
failures are tracked even when users don't report them
res/values/strings.xml
startup_error_titlestringstartup_error_messagestringBehavior
Before this change:
After this change:
Testing