Return old notify service but as deprecated (start does nothing) in order to avoid loading the old jar from the felix cache.

cusax-fix
Damian Minkov 16 years ago
parent 2cb2bd85aa
commit eedf28ab5c

@ -818,7 +818,7 @@
bundle-plugin-yahooaccregwizz,bundle-plugin-aimaccregwizz, bundle-plugin-yahooaccregwizz,bundle-plugin-aimaccregwizz,
bundle-version,bundle-version-impl,bundle-shutdown-timeout, bundle-version,bundle-version-impl,bundle-shutdown-timeout,
bundle-growlnotification,bundle-swingnotification,bundle-galagonotification, bundle-growlnotification,bundle-swingnotification,bundle-galagonotification,
bundle-sparkle, bundle-plugin-branding, bundle-sparkle, bundle-plugin-branding, bundle-audionotifier,
bundle-osdependent,bundle-browserlauncher,bundle-gibberish, bundle-osdependent,bundle-browserlauncher,bundle-gibberish,
bundle-gibberish-slick,bundle-plugin-gibberishaccregwizz, bundle-gibberish-slick,bundle-plugin-gibberishaccregwizz,
bundle-plugin-call-history-form, bundle-plugin-call-history-form,

@ -131,6 +131,7 @@ felix.auto.start.60= \
reference:file:sc-bundles/callhistory.jar \ reference:file:sc-bundles/callhistory.jar \
reference:file:sc-bundles/filehistory.jar \ reference:file:sc-bundles/filehistory.jar \
reference:file:sc-bundles/metahistory.jar \ reference:file:sc-bundles/metahistory.jar \
reference:file:sc-bundles/audionotifier.jar \
reference:file:sc-bundles/keybindings.jar \ reference:file:sc-bundles/keybindings.jar \
reference:file:sc-bundles/notification.jar reference:file:sc-bundles/notification.jar

@ -41,39 +41,42 @@ public class AudioNotifierActivator implements BundleActivator
*/ */
public void start(BundleContext bContext) throws Exception public void start(BundleContext bContext) throws Exception
{ {
try { // this service is deprecated, will leave it for now
AudioNotifierActivator.bundleContext = bContext; // we suspect that even we remove it from starting
// felix starts the version it has in its cache
//Create the audio notifier service // try {
audioNotifier = new AudioNotifierServiceImpl(); // AudioNotifierActivator.bundleContext = bContext;
//
ServiceReference configReference = bundleContext // //Create the audio notifier service
.getServiceReference(ConfigurationService.class.getName()); // audioNotifier = new AudioNotifierServiceImpl();
//
configService = (ConfigurationService) bundleContext // ServiceReference configReference = bundleContext
.getService(configReference); // .getServiceReference(ConfigurationService.class.getName());
//
audioNotifier.setMute( // configService = (ConfigurationService) bundleContext
!configService // .getService(configReference);
.getBoolean( //
"net.java.sip.communicator.impl.sound.isSoundEnabled", // audioNotifier.setMute(
true)); // !configService
// .getBoolean(
logger.logEntry(); // "net.java.sip.communicator.impl.sound.isSoundEnabled",
// true));
logger.info("Audio Notifier Service...[ STARTED ]"); //
// logger.logEntry();
bundleContext //
.registerService( // logger.info("Audio Notifier Service...[ STARTED ]");
AudioNotifierService.class.getName(), //
audioNotifier, // bundleContext
null); // .registerService(
// AudioNotifierService.class.getName(),
logger.info("Audio Notifier Service ...[REGISTERED]"); // audioNotifier,
// null);
} finally { //
logger.logExit(); // logger.info("Audio Notifier Service ...[REGISTERED]");
} //
// } finally {
// logger.logExit();
// }
} }
/** /**
@ -88,19 +91,19 @@ public void start(BundleContext bContext) throws Exception
*/ */
public void stop(BundleContext bContext) throws Exception public void stop(BundleContext bContext) throws Exception
{ {
//TODO: Stop all currently playing sounds here // deprecated
try { // try {
configService.setProperty( // configService.setProperty(
"net.java.sip.communicator.impl.sound.isSoundEnabled", // "net.java.sip.communicator.impl.sound.isSoundEnabled",
Boolean.toString(!audioNotifier.isMute())); // Boolean.toString(!audioNotifier.isMute()));
//
} // }
catch (PropertyVetoException e1) { // catch (PropertyVetoException e1) {
logger.error("The proposed property change " // logger.error("The proposed property change "
+ "represents an unacceptable value"); // + "represents an unacceptable value");
} // }
//
logger.info("AudioNotifier Service ...[STOPPED]"); // logger.info("AudioNotifier Service ...[STOPPED]");
} }
public static ResourceManagementService getResources() public static ResourceManagementService getResources()

Loading…
Cancel
Save