aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/NotificatorManager.java
diff options
context:
space:
mode:
authorIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-04-01 18:22:29 -0300
committerIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-04-01 18:23:00 -0300
commit2891a1a4eee21e6c80b65915d35558c033503047 (patch)
tree9c607179a57caaacf5f44f2c8738bfaa8162ed37 /src/org/traccar/notification/NotificatorManager.java
parentbb289a69fa4d292378c5c534e10985be65b2e392 (diff)
downloadtrackermap-server-2891a1a4eee21e6c80b65915d35558c033503047.tar.gz
trackermap-server-2891a1a4eee21e6c80b65915d35558c033503047.tar.bz2
trackermap-server-2891a1a4eee21e6c80b65915d35558c033503047.zip
generalization for notifications processing
Diffstat (limited to 'src/org/traccar/notification/NotificatorManager.java')
-rw-r--r--src/org/traccar/notification/NotificatorManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/notification/NotificatorManager.java b/src/org/traccar/notification/NotificatorManager.java
index 814c8dc1a..1aa76beff 100644
--- a/src/org/traccar/notification/NotificatorManager.java
+++ b/src/org/traccar/notification/NotificatorManager.java
@@ -19,6 +19,8 @@ package org.traccar.notification;
import java.util.HashMap;
import java.util.Map;
+import org.traccar.Context;
+
public class NotificatorManager {
protected NotificatorManager() {
@@ -29,7 +31,9 @@ public class NotificatorManager {
private static final Notificator NULL_NOTIFICATOR = new NotificationNull();
static {
- NOTIFICATORS.put("sms", new NotificationSms());
+ if (Context.getSmsManager() != null) {
+ NOTIFICATORS.put("sms", new NotificationSms());
+ }
NOTIFICATORS.put("mail", new NotificationMail());
NOTIFICATORS.put("web", new NotificationWeb());
}