summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Hennen <TomHennen@users.noreply.github.com>2016-02-20 10:53:10 -0500
committerTom Hennen <TomHennen@users.noreply.github.com>2016-02-20 10:53:10 -0500
commit32f124f8102cd6d32ca60d2542b51f18327209bf (patch)
treec57abb87d8983372b6fd47af912d073e3d7d5196 /core
parent45a85e50fd5b9edec4c017a0772ce22c916af23a (diff)
parent0569c67b2c29805584e921a47ef804a010a057f3 (diff)
downloadAntennaPod-32f124f8102cd6d32ca60d2542b51f18327209bf.zip
Merge pull request #1690 from mfietz/issue/1685-public-notificationsa
Set notification visibility to public
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java11
2 files changed, 9 insertions, 4 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
index e7ebff154..d939c1007 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
@@ -13,7 +13,6 @@ import android.util.Log;
import android.util.Pair;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -315,6 +314,7 @@ public class GpodnetSyncService extends Service {
.setContentIntent(activityIntent)
.setSmallIcon(R.drawable.stat_notify_sync_error)
.setAutoCancel(true)
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
.build();
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(id, notification);
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 65ff8974c..090c48ca0 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
@@ -350,7 +350,9 @@ public class DownloadService extends Service {
.setOngoing(true)
.setContentIntent(ClientConfig.downloadServiceCallbacks.getNotificationContentIntent(this))
.setLargeIcon(icon)
- .setSmallIcon(R.drawable.stat_notify_sync);
+ .setSmallIcon(R.drawable.stat_notify_sync)
+ .setVisibility(Notification.VISIBILITY_PUBLIC);
+
Log.d(TAG, "Notification set up");
}
@@ -556,7 +558,9 @@ public class DownloadService extends Service {
.setContentIntent(
ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(this)
)
- .setAutoCancel(true).build();
+ .setAutoCancel(true)
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
+ .build();
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(REPORT_ID, notification);
} else {
@@ -609,7 +613,8 @@ public class DownloadService extends Service {
.setSmallIcon(R.drawable.ic_stat_authentication)
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_stat_authentication))
.setAutoCancel(true)
- .setContentIntent(ClientConfig.downloadServiceCallbacks.getAuthentificationNotificationContentIntent(DownloadService.this, downloadRequest));
+ .setContentIntent(ClientConfig.downloadServiceCallbacks.getAuthentificationNotificationContentIntent(DownloadService.this, downloadRequest))
+ .setVisibility(Notification.VISIBILITY_PUBLIC);
Notification n = builder.build();
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(downloadRequest.getSource().hashCode(), n);