Fix crash on SubmitDataUseCase - #3885
Merged
andreia-ferreira merged 8 commits intoAug 20, 2026
Merged
Conversation
andreia-ferreira
requested a deployment
to
e2e-approval
August 14, 2026 14:22 — with
GitHub Actions
Waiting
shobhitagarwal1612
requested changes
Aug 15, 2026
andreia-ferreira
requested a deployment
to
e2e-approval
August 17, 2026 09:56 — with
GitHub Actions
Waiting
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3885 +/- ##
============================================
+ Coverage 68.55% 68.69% +0.14%
- Complexity 1911 1927 +16
============================================
Files 412 412
Lines 10968 10968
Branches 1432 1432
============================================
+ Hits 7519 7535 +16
+ Misses 2701 2685 -16
Partials 748 748
🚀 New features to boost your workflow:
|
andreia-ferreira
requested a deployment
to
e2e-approval
August 18, 2026 07:29 — with
GitHub Actions
Waiting
shobhitagarwal1612
approved these changes
Aug 20, 2026
andreia-ferreira
deleted the
andreia/3882/fix-submit-data-usecase-crash
branch
August 20, 2026 16:01
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.
Fixes #3882
The crash could be reproduced by doing the following:
adb shell am kill org.groundplatform.androidor having developer options 'no background processes'This was because, when the OS kills the app in the background, the data collection screen is recreated at the task the user was in, but with none of the data collected recovered, which caused the crash mentioning the AddLoi task was missing, and previous answers were also silently missing. The only draft recovery path was when the activity would be recreated and the home screen carried the data in nav arguments.
This PR does the following changes:
DataCollectionInitializernow restores draft data so that the screen recovers correctly regardless of how it was openedTaskSequenceHandlermakes it impossible for a task sequence to resume past a mandatory task that the user hasn't answered to avoid cases where data is silently missingBefore:
Screen_recording_20260814_160426.webm
After:
Screen_recording_20260814_160539.webm
@shobhitagarwal1612 PTAL?