fix double SMS on Android 6.0

here
Andreas Shimokawa 2015-12-27 19:22:10 +01:00
parent 2caef02309
commit 55989c426c
1 changed files with 4 additions and 2 deletions

View File

@ -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"))) { if (!"never".equals(sharedPrefs.getString("notification_mode_sms", "when_screen_off"))) {
return; return;
} }
@ -187,7 +188,7 @@ public class NotificationListener extends NotificationListenerService {
if (ai != null) { if (ai != null) {
notificationSpec.sourceName = (String) pm.getApplicationLabel(ai); notificationSpec.sourceName = (String) pm.getApplicationLabel(ai);
} }
switch (source) { switch (source) {
case "org.mariotaku.twidere": case "org.mariotaku.twidere":
case "com.twitter.android": case "com.twitter.android":
@ -201,6 +202,7 @@ public class NotificationListener extends NotificationListenerService {
break; break;
case "com.moez.QKSMS": case "com.moez.QKSMS":
case "com.android.mms": case "com.android.mms":
case "com.android.messaging":
case "com.sonyericsson.conversations": case "com.sonyericsson.conversations":
notificationSpec.type = NotificationType.SMS; notificationSpec.type = NotificationType.SMS;
break; break;