From f317ef54d24d987698f7fe26eaccc53b0a51fe12 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 5 Nov 2021 22:55:37 +0100 Subject: tweak notification settings --- .../main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src') diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java index c8bc0e2d..507de4ae 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java @@ -61,6 +61,7 @@ public class TorNotificationManager { bigText(message)) .setTicker(message) .setContentTitle(state) + .setOnlyAlertOnce(true) .setContentText(message); if (progress > 0) { notificationBuilder.setProgress(100, progress, false); @@ -97,7 +98,8 @@ public class TorNotificationManager { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_NEWSTATUS_ID); notificationBuilder. setDefaults(Notification.DEFAULT_ALL). - setAutoCancel(true); + setLocalOnly(true). + setAutoCancel(false); return notificationBuilder; } -- cgit v1.2.3