Persist job through reboot

This commit is contained in:
ByteHamster 2018-05-04 22:47:53 +02:00
parent eeb032e938
commit ca3d6b9a3d

View File

@ -890,6 +890,7 @@ public class UserPreferences {
ComponentName serviceComponent = new ComponentName(context, FeedUpdateJobService.class);
JobInfo.Builder builder = new JobInfo.Builder(JOB_ID_FEED_UPDATE, serviceComponent);
builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);
builder.setPersisted(true);
return builder;
}