mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-02-19 10:55:53 +00:00
Fix "You're trying to build a job with no constraints, this is not allowed." error when starting a JobService on Android < Q.
(cherry picked from commit 5d1466b549)
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user