1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Allow K9 Mail notifications to be handled as a generic notification if K9 Mail notification mode is set to "never"

This makes it possible to use the "Open on Phone" and individial dismiss feature with K9 Mail.
This commit is contained in:
Andreas Shimokawa 2015-09-05 21:32:46 +02:00
parent a839f07496
commit 02cc8ba455

View File

@ -130,8 +130,7 @@ public class NotificationListener extends NotificationListenerService {
source.equals("com.android.dialer") ||
source.equals("com.android.mms") ||
source.equals("com.moez.QKSMS") ||
source.equals("com.cyanogenmod.eleven") ||
source.equals("com.fsck.k9")) {
source.equals("com.cyanogenmod.eleven")) {
return;
}
@ -141,6 +140,12 @@ public class NotificationListener extends NotificationListenerService {
}
}
if (source.equals("com.fsck.k9")) {
if (!"never".equals(sharedPrefs.getString("notification_mode_k9mail", "when_screen_off"))) {
return;
}
}
LOG.info("Processing notification from source " + source);
Bundle extras = notification.extras;