fix(reminders): catch BadParcelableException in NotificationService#20793
Merged
lukstbit merged 1 commit intoankidroid:mainfrom Apr 20, 2026
Merged
fix(reminders): catch BadParcelableException in NotificationService#20793lukstbit merged 1 commit intoankidroid:mainfrom
lukstbit merged 1 commit intoankidroid:mainfrom
Conversation
If an old intent for a review reminder notification somehow sticks around after a schema migration update, the ReviewReminder stored in the intent will become out of date. While we could implement custom logic to migrate that reminder, that would duplicate the logic for schema migrations currently present in ReviewRemindersDatabase. It's simpler to just fallback on that already-existing logic by triggering a total review reminder schedule and returning early. Hence, this code change.
lukstbit
approved these changes
Apr 20, 2026
mikehardy
reviewed
Apr 20, 2026
Member
mikehardy
left a comment
There was a problem hiding this comment.
I have been through all of these things with Notifee (react-native notification library) before - it's like seeing old friends 😆
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
If an old intent for a review reminder notification somehow sticks around after a schema migration update, the ReviewReminder stored in the intent will become out of date and cause a BadParcelableException.
Fixes
Approach
While we could implement custom logic to migrate that reminder, that would duplicate the logic for schema migrations currently present in ReviewRemindersDatabase. It's simpler to just fallback on that already-existing logic by triggering a total review reminder schedule and returning early. Hence, this code change.
How Has This Been Tested?
I cannot reproduce this bug personally, as whenever I trigger an update to the schema, the entire app uninstalls and re-installs, which throws out the old intents. I assume the original cause of the bug was some transient error. Nonetheless, this defensive try-catch should be a good addition to the codebase here.
Learning (optional, can help others)
Pertinent code in the AOSP
Quoting from my initial response to this issue:
Checklist