Add also a property for GTalk testing.

cusax-fix
Sebastien Vincent 15 years ago
parent 3126bca296
commit e430954fbe

@ -269,7 +269,7 @@ public Call createCall(Contact callee)
else
{
// test GTALK property
if(!Boolean.getBoolean("gtalktesting"))
if(!protocolProvider.isGTalkTesting())
{
continue;
}
@ -701,7 +701,7 @@ public void processPacket(Packet packet)
return;
// test GTALK property
if(!Boolean.getBoolean("gtalktesting") && (packet instanceof SessionIQ))
if(!protocolProvider.isGTalkTesting() && (packet instanceof SessionIQ))
{
return;
}

@ -55,6 +55,7 @@ public class OperationSetContactCapabilitiesJabberImpl
private static final Map<Class<? extends OperationSet>, String[]>
OPERATION_SETS_TO_FEATURES
= new HashMap<Class<? extends OperationSet>, String[]>();
/**
* The <tt>Map</tt> which associates specific additionnal
* <tt>OperationSet</tt> class with the capabilities to be supported by a
@ -358,7 +359,7 @@ private <U extends OperationSet> U getOperationSet(String jid,
opsetClass);
// test GTalk
if(!Boolean.getBoolean("gtalktesting"))
if(!parentProvider.isGTalkTesting())
{
opset = null;
}

@ -964,7 +964,7 @@ private void registerServiceDiscoveryManager()
supportedFeatures.toArray(
new String[supportedFeatures.size()]));
if(Boolean.getBoolean("gtalktesting"))
if(isGTalkTesting())
{
// Add Google Talk "ext" capabilities
discoveryManager.addExtFeature(CAPS_GTALK_WEB_VOICE);
@ -2073,4 +2073,17 @@ public SecurityAuthority getAuthority()
{
return authority;
}
/**
* Returns true if gtalktesting is enabled, false otherwise.
*
* @return true if gtalktesting is enabled, false otherwise.
*/
public boolean isGTalkTesting()
{
return (Boolean.getBoolean("gtalktesting") ||
JabberActivator.getConfigurationService().getBoolean(
"net.java.sip.communicator.impl.protocol.jabber.gtalktesting"
, false));
}
}

Loading…
Cancel
Save