diff options
author | Chris "Koying" Browet <cbro@semperpax.com> | 2018-01-02 21:40:14 +0100 |
---|---|---|
committer | Chris Koying Browet <cbro@semperpax.com> | 2018-01-04 09:53:17 +0100 |
commit | e00c24dabf78041a39672b419612a3f82f45ec22 (patch) | |
tree | 0d956d8afb6fedffe669ed2835d629fb38864f46 /tools/android | |
parent | 385941844fa4d172e7337eb019e32b9eda06d198 (diff) |
FIX: [droid;oreo] re-schedule triggered channel uodate
Diffstat (limited to 'tools/android')
-rw-r--r-- | tools/android/packaging/xbmc/src/channels/SyncProgramsJobService.java.in | 3 | ||||
-rw-r--r-- | tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/android/packaging/xbmc/src/channels/SyncProgramsJobService.java.in b/tools/android/packaging/xbmc/src/channels/SyncProgramsJobService.java.in index 0e85d93846..20ff91c2bd 100644 --- a/tools/android/packaging/xbmc/src/channels/SyncProgramsJobService.java.in +++ b/tools/android/packaging/xbmc/src/channels/SyncProgramsJobService.java.in @@ -74,6 +74,9 @@ public class SyncProgramsJobService extends JobService protected void onPostExecute(Boolean finished) { super.onPostExecute(finished); + // Daisy chain listening for the next change to the channel. + TvUtil.scheduleTriggeredSyncingProgramsForChannel( + SyncProgramsJobService.this, channelId); mSyncProgramsTask = null; jobFinished(jobParameters, !finished); } diff --git a/tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in b/tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in index 08f961a082..e9a36939d2 100644 --- a/tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in +++ b/tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in @@ -202,9 +202,6 @@ public class TvUtil { JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); - if (scheduler.getPendingJob(getTriggeredJobIdForChannelId(channelId)) != null) - return; - ComponentName componentName = new ComponentName(context, SyncProgramsJobService.class); JobInfo.Builder builder = @@ -222,6 +219,7 @@ public class TvUtil bundle.putLong(TvContractCompat.EXTRA_CHANNEL_ID, channelId); builder.setExtras(bundle); + scheduler.cancel(getTriggeredJobIdForChannelId(channelId)); scheduler.schedule(builder.build()); } |