1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 03:16:51 +01:00

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.
This commit is contained in:
Andreas Shimokawa 2016-01-22 21:30:50 +01:00
parent a72373c17c
commit e6f68f445a

View File

@ -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":