From 438a78ed301faf9ce237c8a693dbdb4d8572765f Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 19 Apr 2017 21:55:44 -0700 Subject: [PATCH] Switch jobs with network requirement to timed wakelock // FREEBIE --- src/org/thoughtcrime/securesms/jobs/RefreshAttributesJob.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/jobs/RefreshAttributesJob.java b/src/org/thoughtcrime/securesms/jobs/RefreshAttributesJob.java index 0c5d05bb89..0426388394 100644 --- a/src/org/thoughtcrime/securesms/jobs/RefreshAttributesJob.java +++ b/src/org/thoughtcrime/securesms/jobs/RefreshAttributesJob.java @@ -11,6 +11,7 @@ import org.whispersystems.signalservice.api.SignalServiceAccountManager; import org.whispersystems.signalservice.api.push.exceptions.NetworkFailureException; import java.io.IOException; +import java.util.concurrent.TimeUnit; import javax.inject.Inject; @@ -26,7 +27,7 @@ public class RefreshAttributesJob extends ContextJob implements InjectableType { super(context, JobParameters.newBuilder() .withPersistence() .withRequirement(new NetworkRequirement(context)) - .withWakeLock(true) + .withWakeLock(true, 30, TimeUnit.SECONDS) .withGroupId(RefreshAttributesJob.class.getName()) .create()); }