aboutsummaryrefslogtreecommitdiff
path: root/tools/android
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2018-01-02 21:40:14 +0100
committerChris Koying Browet <cbro@semperpax.com>2018-01-04 09:53:17 +0100
commite00c24dabf78041a39672b419612a3f82f45ec22 (patch)
tree0d956d8afb6fedffe669ed2835d629fb38864f46 /tools/android
parent385941844fa4d172e7337eb019e32b9eda06d198 (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.in3
-rw-r--r--tools/android/packaging/xbmc/src/channels/util/TvUtil.java.in4
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());
}