summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2020-11-01 09:47:32 +0100
committerGitHub <noreply@github.com>2020-11-01 09:47:32 +0100
commitdc98c445c1e265b864d96c259128303bf5103501 (patch)
tree2cab0ef11cb1348f91d54d78925687a32452ce1e
parentec7f639982857776e538d42ef1e8325e5fc1ed02 (diff)
parentf095ca847476bf484c6ba94bdb147313194a8e08 (diff)
downloadAntennaPod-dc98c445c1e265b864d96c259128303bf5103501.zip
Merge pull request #4623 from ByteHamster/cancel-future
Cancel notification updater future before shutting down executor
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java3
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
index f1b35fe23..de106a01e 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
@@ -219,9 +219,9 @@ public class DownloadService extends Service {
} catch (InterruptedException e) {
e.printStackTrace();
}
+ cancelNotificationUpdater();
syncExecutor.shutdown();
schedExecutor.shutdown();
- cancelNotificationUpdater();
if (downloadPostFuture != null) {
downloadPostFuture.cancel(true);
}
@@ -640,6 +640,7 @@ public class DownloadService extends Service {
if (n != null) {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(R.id.notification_downloading, n);
+ Log.d(TAG, "Download progress notification was posted");
}
}
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
index 975bc3cb3..0715d50dd 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
@@ -173,6 +173,7 @@ public class DownloadServiceNotification {
}
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(id, builder.build());
+ Log.d(TAG, "Download report notification was posted");
} else {
Log.d(TAG, "No report is created");
}