summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2020-02-21 18:58:55 +0100
committerGitHub <noreply@github.com>2020-02-21 18:58:55 +0100
commit657d19ccc2c1e3de6555c5c220605bb59225e450 (patch)
tree549008951b95dee09603b8ac2276728103a4a410
parentf4223900fc9c2a55c86f7bacf670368ddf576e15 (diff)
parent431f0bd074f45077d64c35ce44df80e932000bd2 (diff)
downloadAntennaPod-657d19ccc2c1e3de6555c5c220605bb59225e450.zip
Merge pull request #3875 from ByteHamster/hide-notification-earlier
Hide downloading notification earlier
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java3
1 files changed, 2 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 10e271bb0..b8215232c 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
@@ -558,6 +558,7 @@ public class DownloadService extends Service {
if (numberOfDownloads.get() <= 0 && DownloadRequester.getInstance().hasNoDownloads()) {
Log.d(TAG, "Number of downloads is " + numberOfDownloads.get() + ", attempting shutdown");
stopSelf();
+ notificationUpdater.run();
} else {
setupNotificationUpdater();
Notification notification = notificationManager.updateNotifications(
@@ -616,8 +617,8 @@ public class DownloadService extends Service {
* Schedules the notification updater task if it hasn't been scheduled yet.
*/
private void setupNotificationUpdater() {
- Log.d(TAG, "Setting up notification updater");
if (notificationUpdater == null) {
+ Log.d(TAG, "Setting up notification updater");
notificationUpdater = new NotificationUpdater();
notificationUpdaterFuture = schedExecutor.scheduleAtFixedRate(notificationUpdater, 1, 1, TimeUnit.SECONDS);
}