From 55989c426c9a681e16ea121f864752d0708c7a89 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 27 Dec 2015 19:22:10 +0100 Subject: [PATCH] fix double SMS on Android 6.0 --- .../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 aa017beb..5fc8c962 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -164,7 +164,8 @@ public class NotificationListener extends NotificationListenerService { } } - if (source.equals("com.moez.QKSMS") || source.equals("com.android.mms") || source.equals("com.sonyericsson.conversations")) { + if (source.equals("com.moez.QKSMS") || source.equals("com.android.mms") || + source.equals("com.sonyericsson.conversations") || source.equals("com.android.messaging")) { if (!"never".equals(sharedPrefs.getString("notification_mode_sms", "when_screen_off"))) { return; } @@ -187,7 +188,7 @@ public class NotificationListener extends NotificationListenerService { if (ai != null) { notificationSpec.sourceName = (String) pm.getApplicationLabel(ai); } - + switch (source) { case "org.mariotaku.twidere": case "com.twitter.android": @@ -201,6 +202,7 @@ public class NotificationListener extends NotificationListenerService { break; case "com.moez.QKSMS": case "com.android.mms": + case "com.android.messaging": case "com.sonyericsson.conversations": notificationSpec.type = NotificationType.SMS; break;