1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-09 07:01:33 +02:00

Work around non-working outlook notifications

See #851
This commit is contained in:
Andreas Shimokawa 2017-11-14 23:27:01 +01:00
parent 9cedf63a5a
commit 20208ca7a3

View File

@ -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)) {