Don't advertise GTalk audio/video capabilities if calls are disabled (via

the net.java.sip.communicator.impl.protocol.jabber.CALLING_DISABLED property)
cusax-fix
Boris Grozev 13 years ago
parent 11252c5350
commit dd7162993e

@ -339,7 +339,7 @@ else if(calleeAddress.endsWith(GOOGLE_VOICE_DOMAIN))
{
isGingle = false;
}
else if (protocolProvider.isGTalkTesting() // test GTALK property
else if (protocolProvider.isGTalkTesting() // GTalk enabled locally
// see if peer supports Google Talk voice
&& (hasGtalkCaps || alwaysCallGtalk))
{
@ -515,7 +515,7 @@ else if(priority == bestPriority && jabberStatus != null)
}
}
}
else if (protocolProvider.isGTalkTesting() // test GTALK property
else if (protocolProvider.isGTalkTesting() // GTalk enabled locally
// see if peer supports Google Talk voice
&& (hasGtalkCaps || isAlwaysCallGtalk))
{

@ -193,7 +193,7 @@ public class ProtocolProviderServiceJabberImpl
"DESKTOP_STREAMING_DISABLED";
/**
* The name of the property under which the user may specify if the video
* The name of the property under which the user may specify if audio/video
* calls should be disabled.
*/
private static final String IS_CALLING_DISABLED
@ -1313,7 +1313,19 @@ private void registerServiceDiscoveryManager()
supportedFeatures.toArray(
new String[supportedFeatures.size()]));
if(isGTalkTesting())
boolean isCallingDisabled
= JabberActivator.getConfigurationService()
.getBoolean(IS_CALLING_DISABLED, false);
boolean isCallingDisabledForAccount = false;
if (accountID != null && accountID.getAccountPropertyBoolean(
ProtocolProviderFactory.IS_CALLING_DISABLED_FOR_ACCOUNT,
false))
isCallingDisabled = true;
if(isGTalkTesting()
&& !isCallingDisabled
&& !isCallingDisabledForAccount)
{
// Add Google Talk "ext" capabilities
discoveryManager.addExtFeature(CAPS_GTALK_WEB_VOICE);

@ -114,7 +114,7 @@ public class ProtocolProviderServiceSipImpl
= "net.java.sip.communicator.impl.protocol.sip.DESKTOP_STREAMING_DISABLED";
/**
* The name of the property under which the user may specify if the video
* The name of the property under which the user may specify if audio/video
* calls should be disabled.
*/
private static final String IS_CALLING_DISABLED

Loading…
Cancel
Save