From 6fa07b99faf0f5d2d4afaad12cd777b7a616f8a2 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 3 Sep 2020 18:50:09 +0200 Subject: [PATCH] move generic-notification-id to NotificationCenter to keep the overview --- .../securesms/notifications/NotificationCenter.java | 1 + .../securesms/service/GenericForegroundService.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index 382334455..4a0dbd6e9 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -149,6 +149,7 @@ public class NotificationCenter { public static final int ID_PERMANTENT = 1; public static final int ID_MSG_SUMMARY = 2; + public static final int ID_GENERIC = 3; public static final int ID_MSG_OFFSET = 0; // msgId is added - as msgId start at 10, there are no conflicts with lower numbers diff --git a/src/org/thoughtcrime/securesms/service/GenericForegroundService.java b/src/org/thoughtcrime/securesms/service/GenericForegroundService.java index 13570838b..34eb0165f 100644 --- a/src/org/thoughtcrime/securesms/service/GenericForegroundService.java +++ b/src/org/thoughtcrime/securesms/service/GenericForegroundService.java @@ -32,7 +32,6 @@ public final class GenericForegroundService extends Service { private final IBinder binder = new LocalBinder(); - private static final int NOTIFICATION_ID = 849319618; private static final String EXTRA_TITLE = "extra_title"; private static final String EXTRA_CONTENT_TEXT = "extra_content_text"; private static final String EXTRA_CHANNEL_ID = "extra_channel_id"; @@ -109,7 +108,7 @@ public final class GenericForegroundService extends Service { private void postObligatoryForegroundNotification(@NonNull Entry active) { lastPosted = active; - startForeground(NOTIFICATION_ID, new Builder(this, active.channelId) + startForeground(NotificationCenter.ID_GENERIC, new Builder(this, active.channelId) .setSmallIcon(active.iconRes) .setContentTitle(active.title) .setTicker(active.contentText)