summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/gui/NotificationUtils.java10
-rw-r--r--core/src/main/res/values/strings.xml4
3 files changed, 14 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java
index 4c89ebc19..16130ac9b 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java
@@ -491,7 +491,7 @@ public class SyncService extends Worker {
PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),
R.id.pending_intent_sync_error, intent, PendingIntent.FLAG_UPDATE_CURRENT);
Notification notification = new NotificationCompat.Builder(getApplicationContext(),
- NotificationUtils.CHANNEL_ID_ERROR)
+ NotificationUtils.CHANNEL_ID_SYNC_ERROR)
.setContentTitle(getApplicationContext().getString(R.string.gpodnetsync_error_title))
.setContentText(description)
.setContentIntent(pendingIntent)
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/gui/NotificationUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/gui/NotificationUtils.java
index f546ca019..ddbe68938 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/gui/NotificationUtils.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/gui/NotificationUtils.java
@@ -14,6 +14,7 @@ public class NotificationUtils {
public static final String CHANNEL_ID_DOWNLOADING = "downloading";
public static final String CHANNEL_ID_PLAYING = "playing";
public static final String CHANNEL_ID_ERROR = "error";
+ public static final String CHANNEL_ID_SYNC_ERROR = "sync_error";
public static final String CHANNEL_ID_AUTO_DOWNLOAD = "auto_download";
public static void createChannels(Context context) {
@@ -27,6 +28,7 @@ public class NotificationUtils {
mNotificationManager.createNotificationChannel(createChannelDownloading(context));
mNotificationManager.createNotificationChannel(createChannelPlaying(context));
mNotificationManager.createNotificationChannel(createChannelError(context));
+ mNotificationManager.createNotificationChannel(createChannelSyncError(context));
mNotificationManager.createNotificationChannel(createChannelAutoDownload(context));
}
}
@@ -66,6 +68,14 @@ public class NotificationUtils {
}
@RequiresApi(api = Build.VERSION_CODES.O)
+ private static NotificationChannel createChannelSyncError(Context c) {
+ NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID_SYNC_ERROR,
+ c.getString(R.string.notification_channel_sync_error), NotificationManager.IMPORTANCE_HIGH);
+ notificationChannel.setDescription(c.getString(R.string.notification_channel_sync_error_description));
+ return notificationChannel;
+ }
+
+ @RequiresApi(api = Build.VERSION_CODES.O)
private static NotificationChannel createChannelAutoDownload(Context c) {
NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID_AUTO_DOWNLOAD,
c.getString(R.string.notification_channel_auto_download), NotificationManager.IMPORTANCE_DEFAULT);
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 266d9d362..bcc8e6303 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -845,7 +845,9 @@
<string name="notification_channel_playing">Currently playing</string>
<string name="notification_channel_playing_description">Allows to control playback. This is the main notification you see while playing a podcast.</string>
<string name="notification_channel_error">Errors</string>
- <string name="notification_channel_error_description">Shown if something went wrong, for example if download or gpodder sync fails.</string>
+ <string name="notification_channel_error_description">Shown if something went wrong, for example if download or feed update fails.</string>
+ <string name="notification_channel_sync_error">Synchronization Errors</string>
+ <string name="notification_channel_sync_error_description">Shown when gpodder synchronization fails.</string>
<string name="notification_channel_auto_download">Auto Downloads</string>
<string name="notification_channel_episode_auto_download">Shown when episodes have been automatically downloaded.</string>