From e6f68f445ac4947ec266fdb0d3cd936c3afb316c Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Fri, 22 Jan 2016 21:30:50 +0100 Subject: [PATCH] Ignore generic notification when from SMSSecure when SMS Notifications are on. This should improve (not fix) #214 Still, we cannot decrypt SMS, so if you use SMSSecure as the default SMS App you should disable SMS Notifications which enables generic notifications for SMSSecure which are already decrypted. --- .../gadgetbridge/externalevents/NotificationListener.java | 8 ++++++-- 1 file changed, 6 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 81eaaf80..d4f6ed63 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -196,8 +196,11 @@ public class NotificationListener extends NotificationListenerService { } } - if (source.equals("com.moez.QKSMS") || source.equals("com.android.mms") || - source.equals("com.sonyericsson.conversations") || source.equals("com.android.messaging")) { + if (source.equals("com.moez.QKSMS") || + source.equals("com.android.mms") || + source.equals("com.sonyericsson.conversations") || + source.equals("com.android.messaging") || + source.equals("org.smssecure.smssecure")) { if (!"never".equals(sharedPrefs.getString("notification_mode_sms", "when_screen_off"))) { return; } @@ -236,6 +239,7 @@ public class NotificationListener extends NotificationListenerService { case "com.android.mms": case "com.android.messaging": case "com.sonyericsson.conversations": + case "org.smssecure.smssecure": notificationSpec.type = NotificationType.SMS; break; case "eu.siacs.conversations":