From 20208ca7a358e9cca4d9d283d6ed79d8b91e267f Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Tue, 14 Nov 2017 23:27:01 +0100 Subject: [PATCH] Work around non-working outlook notifications See #851 --- .../gadgetbridge/externalevents/NotificationListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index 181f045d0..7ecdeb32a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -441,10 +441,12 @@ public class NotificationListener extends NotificationListenerService { NotificationType type = AppNotificationType.getInstance().get(source); //ignore notifications marked as LocalOnly https://developer.android.com/reference/android/app/Notification.html#FLAG_LOCAL_ONLY + //some Apps always mark their notifcations as read-only if (NotificationCompat.getLocalOnly(notification) && - //WeChat always marks its notifications as LocalOnly, do not ignore them - type != NotificationType.WECHAT) + type != NotificationType.WECHAT && + type != NotificationType.OUTLOOK) { return true; + } Prefs prefs = GBApplication.getPrefs(); if (!prefs.getBoolean("notifications_generic_whenscreenon", false)) {