diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-04-20 21:32:03 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-04-20 21:32:03 +0200 |
commit | 70938a31a0e78203449d769fa5bda15ce73d1ed4 (patch) | |
tree | d789c0c44b26bdeeedde286ab3e09a67c3dd0e5b /src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java | |
parent | 58572ba858835437011d2f450bd90fb93455b5c9 (diff) | |
parent | 7df96caedbbb96a28d4f7e07fa2d159c8ca1373f (diff) |
Merge branch 'master' into message_display_rework
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java index 1baec3a5..a3142df4 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java @@ -176,6 +176,7 @@ public class NotificationService { final String ringtone = ConversationsPlusPreferences.notificationRingtone(); final boolean vibrate = ConversationsPlusPreferences.vibrateOnNotification(); + final boolean led = ConversationsPlusPreferences.led(); if (notifications.size() == 0) { notificationManager.cancel(NOTIFICATION_ID); @@ -206,7 +207,9 @@ public class NotificationService { mBuilder.setDefaults(0); mBuilder.setSmallIcon(R.drawable.ic_notification); mBuilder.setDeleteIntent(createDeleteIntent()); - mBuilder.setLights(Settings.LED_COLOR, 2000, 4000); + if (led) { + mBuilder.setLights(Settings.LED_COLOR, 2000, 4000); + } final Notification notification = mBuilder.build(); notificationManager.notify(NOTIFICATION_ID, notification); } @@ -537,7 +540,7 @@ public class NotificationService { errors.add(account); } } - if (mXmppConnectionService.getPreferences().getBoolean("keep_foreground_service", false)) { + if (ConversationsPlusPreferences.keepForegroundService()) { notificationManager.notify(FOREGROUND_NOTIFICATION_ID, createForegroundNotification()); } final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService); |