diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-22 17:09:27 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-22 17:09:27 +0000 |
commit | 5d1466b5498eb2be7ff8c0ad5983e2833ad15115 (patch) | |
tree | 29d099f233b71198c048d5e6f0d824024f7cb37d /app/src/main/java/ml/docilealligator | |
parent | 5f80ada130a53d5c5b6addc16bca6b37c76734ca (diff) | |
download | infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar.gz infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar.bz2 infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar.lz infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar.xz infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.tar.zst infinity-for-reddit-5d1466b5498eb2be7ff8c0ad5983e2833ad15115.zip |
Fix "You're trying to build a job with no constraints, this is not allowed." error when starting a JobService on Android < Q.
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
4 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java index 6ef5b921..75dc884d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java @@ -95,6 +95,7 @@ public class DownloadMediaService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, DownloadMediaService.class)) + .setOverrideDeadline(0) .setExtras(extras) .build(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java index 9bf0aa2b..13da3088 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java @@ -103,6 +103,7 @@ public class DownloadRedditVideoService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, DownloadRedditVideoService.class)) + .setOverrideDeadline(0) .setExtras(extras) .build(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java index fc25add7..aaf9da4e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java @@ -83,6 +83,7 @@ public class EditProfileService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, EditProfileService.class)) + .setOverrideDeadline(0) .setExtras(extras) .build(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java index 13e2015f..8a42847d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java @@ -129,6 +129,7 @@ public class SubmitPostService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, SubmitPostService.class)) + .setOverrideDeadline(0) .setExtras(extras) .build(); } |