diff options
3 files changed, 7 insertions, 8 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java b/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java index f50b4143b..ee6e0233c 100644 --- a/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java +++ b/app/src/main/java/de/danoeh/antennapod/config/DownloadServiceCallbacksImpl.java @@ -12,6 +12,7 @@ import de.danoeh.antennapod.core.DownloadServiceCallbacks; import de.danoeh.antennapod.core.feed.Feed; import de.danoeh.antennapod.core.service.download.DownloadRequest; import de.danoeh.antennapod.fragment.DownloadsFragment; +import de.danoeh.antennapod.fragment.QueueFragment; public class DownloadServiceCallbacksImpl implements DownloadServiceCallbacks { @@ -35,7 +36,7 @@ public class DownloadServiceCallbacksImpl implements DownloadServiceCallbacks { } @Override - public PendingIntent getReportNotificationContentIntent(Context context) { + public PendingIntent getReportNotificationContentIntent(Context context, boolean autoDownloadReport) { Intent intent = new Intent(context, MainActivity.class); intent.putExtra(MainActivity.EXTRA_FRAGMENT_TAG, DownloadsFragment.TAG); Bundle args = new Bundle(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/DownloadServiceCallbacks.java b/core/src/main/java/de/danoeh/antennapod/core/DownloadServiceCallbacks.java index e56445489..4473d3ac7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/DownloadServiceCallbacks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/DownloadServiceCallbacks.java @@ -40,7 +40,7 @@ public interface DownloadServiceCallbacks { * * @return A non-null PendingIntent for the notification or null if shouldCreateReport()==false */ - PendingIntent getReportNotificationContentIntent(Context context); + PendingIntent getReportNotificationContentIntent(Context context, boolean autoDownloadReport); /** * Called by the FeedSyncThread after a feed has been downloaded and parsed. 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 7e8b53732..30c1c9773 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 @@ -125,12 +125,10 @@ public class DownloadServiceNotification { NotificationCompat.Builder builder = new NotificationCompat.Builder(context, channelId); builder.setTicker(context.getString(titleId)) .setContentTitle(context.getString(R.string.download_report_content_title)) - .setContentText(String.format( - context.getString(R.string.download_report_content), - successfulDownloads, failedDownloads)) - .setSmallIcon(autoDownloadReport ? R.drawable.stat_notify_sync : R.drawable.stat_notify_sync_error) - .setContentIntent(ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(context)) - .setAutoCancel(true); + .setContentText(String.format(context.getString(R.string.download_report_content), successfulDownloads, failedDownloads)) + .setSmallIcon(autoDownloadReport ? R.drawable.stat_notify_sync : R.drawable.stat_notify_sync_error) + .setContentIntent(ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(context, autoDownloadReport)) + .setAutoCancel(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); } |