aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-04-09 21:48:06 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-04-09 21:48:06 +0200
commit83fab0650880873f0fb77697acc4c5102ad5f166 (patch)
treee81c33a76ca3eb8899efea695078c38a7c45afde /src/main/java/eu/siacs
parent4652541b61df5490d04cfa9efe57acd0612b3bc5 (diff)
introduced setting to turn of notification led
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index cec9a3ef..003f5471 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -180,6 +180,7 @@ public class NotificationService {
final String ringtone = preferences.getString("notification_ringtone", null);
final boolean vibrate = preferences.getBoolean("vibrate_on_notification", true);
+ final boolean led = preferences.getBoolean("led", true);
if (notifications.size() == 0) {
notificationManager.cancel(NOTIFICATION_ID);
@@ -210,7 +211,9 @@ public class NotificationService {
mBuilder.setDefaults(0);
mBuilder.setSmallIcon(R.drawable.ic_notification);
mBuilder.setDeleteIntent(createDeleteIntent());
- mBuilder.setLights(0xff00FF00, 2000, 3000);
+ if (led) {
+ mBuilder.setLights(0xff00FF00, 2000, 3000);
+ }
final Notification notification = mBuilder.build();
notificationManager.notify(NOTIFICATION_ID, notification);
}