diff options
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index 2b8860187..d859e91bb 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -23,6 +23,7 @@ import java.util.Properties; import org.apache.velocity.app.VelocityEngine; import org.eclipse.jetty.util.URIUtil; import org.traccar.database.AliasesManager; +import org.traccar.database.CalendarManager; import org.traccar.database.ConnectionManager; import org.traccar.database.DataManager; import org.traccar.database.DeviceManager; @@ -124,6 +125,12 @@ public final class Context { return geofenceManager; } + private static CalendarManager calendarManager; + + public static CalendarManager getCalendarManager() { + return calendarManager; + } + private static NotificationManager notificationManager; public static NotificationManager getNotificationManager() { @@ -235,7 +242,11 @@ public final class Context { switch (type) { case "mozilla": - locationProvider = new MozillaLocationProvider(); + if (key != null) { + locationProvider = new MozillaLocationProvider(key); + } else { + locationProvider = new MozillaLocationProvider(); + } break; default: locationProvider = new OpenCellIdLocationProvider(key); @@ -253,6 +264,7 @@ public final class Context { if (config.getBoolean("event.geofenceHandler")) { geofenceManager = new GeofenceManager(dataManager); + calendarManager = new CalendarManager(dataManager); } if (config.getBoolean("event.enable")) { |