-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5136: Fix retried uploads stuck in queued state (#5272)
* fix stuck uploads * automate retries for failed uploads once the user returns to the app * UploadWorker: modify PendingIntent flag and Android version code * MainActivity: remove automatic retry logic * Revert "MainActivity: remove automatic retry logic" * set work request as expedited * handle notification for foreground service on older versions of Android * set backoff criteria for work requests * enqueue failed uploads for a retry * revert "enqueue failed uploads for a retry" * limit the number of retries for a failed upload * add a popup that suggests users to switch to unrestricted battery usage mode * take users to the battery settings page on the first big upload * take users to battery optimisation settings page using the standard intent * add instructions to the battery optimisation settings popup * remove the first usage of fr.free.nrw.commons from the popup * comply with the wording in the OS settings * modify battery optimisation popup instructions, add comments and rename firstBigUploadSet * add filename to the retry log statement * update database version * make battery optimisation dialog appear only on Android 6 and above * use foreground service instead of setting work request as expedited * fix retried uploads stuck in queued state * use MIN_BACKOFF_MILLIS constant instead of using the number 10 and add comments * factorise the creation of the new OneTimeWorkRequest at one place * ensure work requests are in accordance with the unit tests * forbid retries for images which have got uploaded without caption * add a TODO for the suggestion related to retries * revert "forbid retries for images which have got uploaded without caption"
- Loading branch information
1 parent
4540f54
commit 81030d1
Showing
11 changed files
with
200 additions
and
47 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.