diff options
author | George Politis <gp@jitsi.org> | 2014-06-09 20:39:04 +0200 |
---|---|---|
committer | George Politis <gp@jitsi.org> | 2014-06-09 20:39:04 +0200 |
commit | d3db0d29a166e91a096f6e8daa959107811a0b84 (patch) | |
tree | 404c0af03098857929da83fe2765b0c8fa65463c /src | |
parent | 64b51e078dddc12e4b06e7c9d2d76a9ce20a6092 (diff) | |
download | jitsi-d3db0d29a166e91a096f6e8daa959107811a0b84.zip jitsi-d3db0d29a166e91a096f6e8daa959107811a0b84.tar.gz jitsi-d3db0d29a166e91a096f6e8daa959107811a0b84.tar.bz2 |
Fixes IllegalStateException: Invalid BundleContext in the OTR bundle.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/java/sip/communicator/plugin/otr/OtrActivator.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/plugin/otr/OtrActivator.java b/src/net/java/sip/communicator/plugin/otr/OtrActivator.java index d474524..aa4e5ab 100644 --- a/src/net/java/sip/communicator/plugin/otr/OtrActivator.java +++ b/src/net/java/sip/communicator/plugin/otr/OtrActivator.java @@ -78,7 +78,7 @@ public class OtrActivator /** * The {@link ScOtrEngine} of the {@link OtrActivator}. */ - public static ScOtrEngine scOtrEngine; + public static ScOtrEngineImpl scOtrEngine; /** * The {@link ScOtrKeyManager} of the {@link OtrActivator}. @@ -103,6 +103,11 @@ public class OtrActivator private static MessageHistoryService messageHistoryService; /** + * The {@link OtrContactManager} of the {@link OtrActivator}. + */ + private static OtrContactManager otrContactManager; + + /** * Gets an {@link AccountID} by its UID. * * @param uid The {@link AccountID} UID. @@ -303,12 +308,13 @@ public class OtrActivator // Init static variables, don't proceed without them. scOtrEngine = new ScOtrEngineImpl(); + otrContactManager = new OtrContactManager(); otrTransformLayer = new OtrTransformLayer(); // Register Transformation Layer bundleContext.addServiceListener(this); - bundleContext.addServiceListener((ServiceListener) scOtrEngine); - bundleContext.addServiceListener(new OtrContactManager()); + bundleContext.addServiceListener(scOtrEngine); + bundleContext.addServiceListener(otrContactManager); ServiceReference[] protocolProviderRefs = ServiceUtils.getServiceReferences( @@ -417,6 +423,8 @@ public class OtrActivator // Unregister transformation layer. // start listening for newly register or removed protocol providers bundleContext.removeServiceListener(this); + bundleContext.removeServiceListener(scOtrEngine); + bundleContext.removeServiceListener(otrContactManager); ServiceReference[] protocolProviderRefs = null; try |