Make the Android application to use the new API for tunnel management

This commit is contained in:
François Grisez 2014-09-22 11:01:25 +02:00
parent f51f22e487
commit 77516c7162

View file

@ -455,13 +455,13 @@ public class LinphoneManager implements LinphoneCoreListener {
Log.i("Managing tunnel"); Log.i("Managing tunnel");
if (isTunnelNeeded(info)) { if (isTunnelNeeded(info)) {
Log.i("Tunnel need to be activated"); Log.i("Tunnel need to be activated");
mLc.tunnelEnable(true); mLc.tunnelSetMode(LinphoneCore.TunnelMode.enable);
} else { } else {
Log.i("Tunnel should not be used"); Log.i("Tunnel should not be used");
String pref = mPrefs.getTunnelMode(); String pref = mPrefs.getTunnelMode();
mLc.tunnelEnable(false); mLc.tunnelSetMode(LinphoneCore.TunnelMode.disable);
if (getString(R.string.tunnel_mode_entry_value_auto).equals(pref)) { if (getString(R.string.tunnel_mode_entry_value_auto).equals(pref)) {
mLc.tunnelAutoDetect(); mLc.tunnelSetMode(LinphoneCore.TunnelMode.auto);
} }
} }
} }