diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2017-02-28 08:22:25 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2017-02-28 08:22:25 +0100 |
commit | 7be70744f53b5a8f5b6388c9f14c34730f22a7f6 (patch) | |
tree | 2f1de5ae0df342fa2fc0d3b0931fafb676a4076f | |
parent | 8aacaf46e1553269e8f19076a33072b148ceb051 (diff) | |
download | jitsi-7be70744f53b5a8f5b6388c9f14c34730f22a7f6.zip jitsi-7be70744f53b5a8f5b6388c9f14c34730f22a7f6.tar.gz jitsi-7be70744f53b5a8f5b6388c9f14c34730f22a7f6.tar.bz2 |
Fix Voicemail URI editing in UI
Closes #333
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java b/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java index 9719b8c..5355855 100644 --- a/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java +++ b/src/net/java/sip/communicator/service/protocol/sip/SIPAccountRegistration.java @@ -24,7 +24,7 @@ import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; import org.jitsi.service.neomedia.*; - +import org.jitsi.util.StringUtils; import org.osgi.framework.*; /** @@ -257,23 +257,37 @@ public class SIPAccountRegistration encodingsRegistration.storeProperties(this.accountProperties); - if (isModification) + if(isMessageWaitingIndicationsEnabled()) { - if (isMessageWaitingIndicationsEnabled()) + if(!StringUtils.isNullOrEmpty(getVoicemailURI(), true)) + accountProperties.put( + ProtocolProviderFactory.VOICEMAIL_URI, + getVoicemailURI()); + else if(isModification) + accountProperties.put(ProtocolProviderFactory.VOICEMAIL_URI, ""); + + if(!StringUtils.isNullOrEmpty( + getVoicemailCheckURI(), true)) + accountProperties.put( + ProtocolProviderFactory.VOICEMAIL_CHECK_URI, + getVoicemailCheckURI()); + else if(isModification) + accountProperties.put( + ProtocolProviderFactory.VOICEMAIL_CHECK_URI, ""); + + if(isModification) { - setVoicemailURI(""); - setVoicemailCheckURI(""); // remove the property as true is by default, // and null removes property - removeAccountProperty( - ProtocolProviderFactory.VOICEMAIL_ENABLED); - } else - { - accountProperties.put( - ProtocolProviderFactory.VOICEMAIL_ENABLED, - Boolean.FALSE.toString()); + accountProperties.put(ProtocolProviderFactory.VOICEMAIL_ENABLED, + null); } } + else if(isModification) + { + accountProperties.put(ProtocolProviderFactory.VOICEMAIL_ENABLED, + Boolean.FALSE.toString()); + } super.storeProperties( protocolIconPath, accountIconPath, accountProperties); |