This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 499
Background/Async TEK submission (EXPOSUREAPP-3620) #2008
Merged
ralfgehrer
merged 18 commits into
release/1.11.x
from
feature/3620-background-submission
Jan 5, 2021
Merged
Background/Async TEK submission (EXPOSUREAPP-3620) #2008
ralfgehrer
merged 18 commits into
release/1.11.x
from
feature/3620-background-submission
Jan 5, 2021
Conversation
This file contains 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
…condition" for the SubmissionTask
d4rken
added
enhancement
Improvement of an existing feature
maintainers
Tag pull requests created by maintainers
labels
Dec 29, 2020
Set SubmissionWorker deployed task requests to SILENT.
…MIT_ASAP. Otherwise would loose that data when the app is restarted despite it still "trying". Only reset the data on DISABLED, i.e. when the task finishes or give sup.
ralfgehrer
reviewed
Jan 4, 2021
...va/de/rki/coronawarnapp/ui/submission/symptoms/calendar/SubmissionSymptomCalendarFragment.kt
Show resolved
Hide resolved
ralfgehrer
reviewed
Jan 4, 2021
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/submission/auto/AutoSubmission.kt
Outdated
Show resolved
Hide resolved
ralfgehrer
reviewed
Jan 4, 2021
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/submission/auto/AutoSubmission.kt
Outdated
Show resolved
Hide resolved
Very nice and readable code! Double checked all scenarios I could come up with (cold start, resuming the app, initial states, second submissions) from a coding POV. Device testing still ongoing. |
ralfgehrer
previously approved these changes
Jan 4, 2021
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.
Device test successful on a Pixel (Android 10).
BMItr
reviewed
Jan 4, 2021
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/submission/auto/AutoSubmission.kt
Show resolved
Hide resolved
BMItr
reviewed
Jan 4, 2021
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/submission/auto/AutoSubmission.kt
Show resolved
Hide resolved
BMItr
previously approved these changes
Jan 4, 2021
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.
Code lgtm, tested on pixel 2 device.
Little questions, but no urgent.
We retry until we are successful, any abort conditions will be handled by the task.
Please adjust SubmissionWorkerTest at last |
BMItr
previously approved these changes
Jan 5, 2021
ralfgehrer
previously approved these changes
Jan 5, 2021
Kudos, SonarCloud Quality Gate passed! |
ralfgehrer
approved these changes
Jan 5, 2021
BMItr
approved these changes
Jan 5, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.
This PR adds background submission of TEKs to increase chance of submission if the user "forgets" or in some other capacity allows submission but does not finish it.
Once consent is given, and TEKs are available there will be a periodic background worker "lurking", waiting for ~30min of user inactivity. Once 30min is reached, or if the user completes submission themselves, or if the app is restarted, submission is performed.
There are two time values to note, the 15min interval at which we can execute the submission worker, and the 30min of user inactivity that is required before we automatically submit the keys.
Interesting classes:
AutoSubmission.kt
SubmissionTask.kt
Testing
For testing the 30min inactivity timeout may be reduced to 15min for testing (see
SubmissionTask.USER_INACTIVITY_TIMEOUT
).