Adds new property which can skip using default saved preferred provider when call using the call history.

cusax-fix
Damian Minkov 13 years ago
parent 4014631dd5
commit bb8762c945

@ -61,6 +61,14 @@ public class CallManager
= "net.java.sip.communicator.impl.gui.main"
+ ".call.SHOW_DESKTOP_SHARING_WARNING";
/**
* The name of the property which indicates whether the preferred provider
* will be used when calling UIContact (call history).
*/
private static final String USE_PREFERRED_PROVIDER_PROP
= "net.java.sip.communicator.impl.gui.main"
+ ".call.USE_PREFERRED_PROVIDER_PROP";
/**
* The <tt>CallPanel</tt>s opened by <tt>CallManager</tt> (because
* <tt>CallContainer</tt> does not give access to such lists.)
@ -3691,6 +3699,36 @@ public static void call(List<UIContactDetail> uiContactDetailList,
boolean isDesktop,
JComponent invoker,
Point location)
{
call(uiContactDetailList,
uiContact,
isVideo,
isDesktop,
invoker,
location,
true);
}
/**
* Call any of the supplied details.
*
* @param uiContactDetailList the list with details to choose for calling
* @param uiContact the <tt>UIContactImpl</tt> to check what is enabled,
* available.
* @param isVideo if <tt>true</tt> will create video call.
* @param isDesktop if <tt>true</tt> will share the desktop.
* @param invoker the invoker component
* @param location the location where this was invoked.
* @param usePreferredProvider whether to use the <tt>uiContact</tt>
* preferredProvider if provided.
*/
private static void call(List<UIContactDetail> uiContactDetailList,
UIContactImpl uiContact,
boolean isVideo,
boolean isDesktop,
JComponent invoker,
Point location,
boolean usePreferredProvider)
{
ChooseCallAccountPopupMenu chooseCallAccountPopupMenu = null;
@ -3737,8 +3775,11 @@ public static void call(List<UIContactDetail> uiContactDetailList,
{
UIContactDetail detail = uiContactDetailList.get(0);
ProtocolProviderService preferredProvider
= detail.getPreferredProtocolProvider(opsetClass);
ProtocolProviderService preferredProvider = null;
if(usePreferredProvider)
preferredProvider =
detail.getPreferredProtocolProvider(opsetClass);
List<ProtocolProviderService> providers = null;
String protocolName = null;
@ -3853,12 +3894,17 @@ public static void call(UIContact uiContact,
= uiContact.getContactDetailsForOperationSet(
getOperationSetForCall(isVideo, isDesktop));
boolean usePreferredProvider =
GuiActivator.getConfigurationService().getBoolean(
USE_PREFERRED_PROVIDER_PROP, true);
call( telephonyContacts,
uiContactImpl,
isVideo,
isDesktop,
invoker,
location);
location,
usePreferredProvider);
}
/**

Loading…
Cancel
Save