aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/util/UtilActivator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/util/UtilActivator.java')
-rw-r--r--src/net/java/sip/communicator/util/UtilActivator.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/util/UtilActivator.java b/src/net/java/sip/communicator/util/UtilActivator.java
index 457f18d..9a7c551 100644
--- a/src/net/java/sip/communicator/util/UtilActivator.java
+++ b/src/net/java/sip/communicator/util/UtilActivator.java
@@ -6,8 +6,10 @@
*/
package net.java.sip.communicator.util;
+import net.java.sip.communicator.plugin.extendedcallhistorysearch.*;
+import net.java.sip.communicator.service.resources.*;
+
import org.osgi.framework.*;
-import java.lang.Thread.*;
/**
* The only raison d'etre for this Activator is so that it would set a global
@@ -23,6 +25,11 @@ public class UtilActivator
{
private static final Logger logger
= Logger.getLogger(UtilActivator.class);
+
+ private static ResourceManagementService resourceService;
+
+ private static BundleContext bundleContext;
+
/**
* Calls <tt>Thread.setUncaughtExceptionHandler()</tt>
*
@@ -38,6 +45,8 @@ public class UtilActivator
{
logger.trace("Setting default uncaught exception handler.");
+ bundleContext = context;
+
Thread.setDefaultUncaughtExceptionHandler(this);
Thread.currentThread().setDefaultUncaughtExceptionHandler(this);
}
@@ -76,4 +85,18 @@ public class UtilActivator
{
}
+
+ /**
+ * Returns the service giving access to all application resources.
+ *
+ * @return the service giving access to all application resources.
+ */
+ public static ResourceManagementService getResources()
+ {
+ if (resourceService == null)
+ resourceService =
+ ResourceManagementServiceUtils.getService(bundleContext);
+
+ return resourceService;
+ }
}