Skip to content

Commit

Permalink
Fix scheduled backup jobs cancelling itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal authored and greyson-signal committed Mar 4, 2023
1 parent 8cbad2c commit e635c30
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -56,9 +56,9 @@ public static void enqueue(boolean force) {
.setQueue(QUEUE)
.setMaxInstancesForFactory(1)
.setMaxAttempts(3);
if (force || Build.VERSION.SDK_INT >= 31) {
if (force) {
jobManager.cancelAllInQueue(QUEUE);
} else {
} else if (Build.VERSION.SDK_INT < 31) {
parameters.addConstraint(ChargingConstraint.KEY);
}

Expand Down

0 comments on commit e635c30

Please sign in to comment.