From fbc270a60384e9cc3ab0edee570f8c0dc52c57ea Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 15 Jul 2021 11:38:20 +0200 Subject: [PATCH] Bypass DND --- app/src/main/java/eu/faircode/email/NotificationHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/NotificationHelper.java b/app/src/main/java/eu/faircode/email/NotificationHelper.java index 10761d5990..d4fbab7546 100644 --- a/app/src/main/java/eu/faircode/email/NotificationHelper.java +++ b/app/src/main/java/eu/faircode/email/NotificationHelper.java @@ -74,6 +74,7 @@ class NotificationHelper { notification.enableLights(true); notification.setLightColor(Color.YELLOW); notification.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + notification.setBypassDnd(true); nm.createNotificationChannel(notification); NotificationChannel progress = new NotificationChannel( @@ -99,6 +100,7 @@ class NotificationHelper { "warning", context.getString(R.string.channel_warning), NotificationManager.IMPORTANCE_HIGH); warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + warning.setBypassDnd(true); nm.createNotificationChannel(warning); // Errors @@ -107,6 +109,7 @@ class NotificationHelper { context.getString(R.string.channel_error), NotificationManager.IMPORTANCE_HIGH); error.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + error.setBypassDnd(true); nm.createNotificationChannel(error); // Server alerts @@ -115,6 +118,7 @@ class NotificationHelper { context.getString(R.string.channel_alert), NotificationManager.IMPORTANCE_HIGH); alerts.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + alerts.setBypassDnd(true); nm.createNotificationChannel(alerts); // Contacts grouping