mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Switch jobs with network requirement to timed wakelock
// FREEBIE
This commit is contained in:
parent
8e7c7a9c54
commit
438a78ed30
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user