From a02d54523aa7ed93662681200e23fab32db9dc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Thu, 25 Aug 2022 14:12:25 +0100 Subject: [PATCH] Prefer big text for Gmail notifications --- .../gadgetbridge/externalevents/NotificationListener.java | 5 ++--- 1 file changed, 2 insertions(+), 3 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 24213b3d15..3244d247e0 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -343,8 +343,6 @@ public class NotificationListener extends NotificationListenerService { notificationSpec.sourceName = name; } - boolean preferBigText = false; - // Get the app ID that generated this notification. For now only used by pebble color, but may be more useful later. notificationSpec.sourceAppId = source; @@ -359,7 +357,6 @@ public class NotificationListener extends NotificationListenerService { LOG.info("ignore K9 group summary"); return; } - preferBigText = true; } if (notificationSpec.type == null) { @@ -371,6 +368,8 @@ public class NotificationListener extends NotificationListenerService { LOG.info("Processing notification " + notificationSpec.getId() + " age: " + (System.currentTimeMillis() - notification.when) + " from source " + source + " with flags: " + notification.flags); + boolean preferBigText = source.startsWith("com.fsck.k9") || source.equals("com.google.android.gm"); + dissectNotificationTo(notification, notificationSpec, preferBigText); if (notificationSpec.body != null) {