diff --git a/res/values/non_localizable_custom.xml b/res/values/non_localizable_custom.xml
index ccdb0d649..6348fca37 100644
--- a/res/values/non_localizable_custom.xml
+++ b/res/values/non_localizable_custom.xml
@@ -17,6 +17,7 @@
true
#191970
+ false
linphone-android@belledonne-communications.com
diff --git a/res/values/non_localizable_strings.xml b/res/values/non_localizable_strings.xml
index 24b210f40..697366fce 100644
--- a/res/values/non_localizable_strings.xml
+++ b/res/values/non_localizable_strings.xml
@@ -2,6 +2,8 @@
+ pref_disable_account_key
+
pref_tunnel_key
pref_tunnel_mode_key
disabled
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6405a08a8..b91b0bdaf 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,6 +1,8 @@
+ Disable
+
Tunnel
Hostname
Port
diff --git a/src/org/linphone/DialerActivity.java b/src/org/linphone/DialerActivity.java
index 9fa7d418d..7b3f145a6 100644
--- a/src/org/linphone/DialerActivity.java
+++ b/src/org/linphone/DialerActivity.java
@@ -84,6 +84,7 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
private LinearLayout mInCallControls;
private static DialerActivity instance;
+ public boolean mVisible;
private boolean mPreventDoubleCallOnRotation;
private AlertDialog wizardDialog;
@@ -226,7 +227,7 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
mBack.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
- if (call.getCurrentParamsCopy().getVideoEnabled())
+ if (call != null && call.getCurrentParamsCopy().getVideoEnabled())
LinphoneActivity.instance().startVideoActivity(call, 0);
else
LinphoneActivity.instance().startIncallActivity();
@@ -359,6 +360,7 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
@Override
protected void onPause() {
super.onPause();
+ mVisible = false;
if (mCamera != null) {
mCamera.release();
@@ -502,6 +504,7 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
// and set to the to be destroyed Dialer.
// Note1: We wait as long as possible before setting the last message.
// Note2: Linphone service is in charge of instantiating LinphoneManager
+ mVisible = true;
mStatus.setText(LinphoneManager.getInstance().getLastLcStatusMessage());
super.onResume();
@@ -513,13 +516,14 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
if (AndroidCameraConfiguration.hasSeveralCameras() && mSwitchCamera != null)
mSwitchCamera.setVisibility(View.VISIBLE);
- if (mVideoCaptureView != null && mCamera == null && !LinphoneManager.getLc().isIncall())
- {
+ boolean isInCall = LinphoneManager.getLc().isIncall();
+ isInCall = isInCall || LinphoneManager.getLc().getCallsNb() > 0;
+
+ if (mVideoCaptureView != null && mCamera == null && !LinphoneManager.getLc().isIncall()) {
mCamera = Camera.open(mCurrentCameraId);
mVideoCaptureView.switchCamera(mCamera, mCurrentCameraId);
mCamera.startPreview();
- } else if (LinphoneManager.getLc().isIncall())
- {
+ } else if (isInCall) {
if (mInCallControls != null) {
mInCallControls.setVisibility(View.VISIBLE);
mCall.setVisibility(View.GONE);
@@ -534,6 +538,13 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (LinphoneUtils.onKeyVolumeSoftAdjust(keyCode)) return true;
+ boolean isInCall = LinphoneManager.getLc().isIncall();
+ isInCall = isInCall || LinphoneManager.getLc().getCallsNb() > 0;
+ if (keyCode == KeyEvent.KEYCODE_BACK && isInCall) {
+ // If we are in call on dialer, we go back to the incall view
+ LinphoneActivity.instance().startIncallActivity();
+ return true;
+ }
return super.onKeyDown(keyCode, event);
}
}
diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java
index 3b6430508..62a70f2a0 100644
--- a/src/org/linphone/LinphoneManager.java
+++ b/src/org/linphone/LinphoneManager.java
@@ -314,7 +314,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
LinphoneAddress lAddress;
try {
lAddress = mLc.interpretUrl(to);
- if (mLc.isMyself(lAddress.asStringUriOnly())) {
+ if (mR.getBoolean(R.bool.forbid_self_call) && mLc.isMyself(lAddress.asStringUriOnly())) {
mListenerDispatcher.tryingNewOutgoingCallButWrongDestinationAddress();
return;
}
@@ -673,9 +673,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
lDefaultProxyConfig.enableRegister(true);
lDefaultProxyConfig.done();
}
-
+
// Extra accounts
for (int i = 1; i < getPrefExtraAccountsNumber(); i++) {
+ if (getPrefBoolean(getString(R.string.pref_disable_account_key) + i, false)) {
+ continue;
+ }
lUserName = getPrefString(getString(R.string.pref_username_key) + i, null);
lPasswd = getPrefString(getString(R.string.pref_passwd_key) + i, null);
if (lUserName != null && lUserName.length() > 0) {
diff --git a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java
index 551e2ba4c..96f37b9ac 100644
--- a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java
+++ b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java
@@ -77,7 +77,12 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity {
outboundProxy.setTitle(getString(R.string.pref_enable_outbound_proxy));
outboundProxy.setPersistent(true);
outboundProxy.setKey(getString(R.string.pref_enable_outbound_proxy_key) + getAccountNumber(n));
-
+
+ CheckBoxPreference disable = new CheckBoxPreference(this);
+ disable.setTitle(getString(R.string.pref_disable_account));
+ disable.setPersistent(true);
+ disable.setKey(getString(R.string.pref_disable_account_key) + getAccountNumber(n));
+
final Preference delete = new Preference(this);
delete.setTitle("Delete this account");
delete.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@@ -91,6 +96,7 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity {
editor.putString(getString(R.string.pref_domain_key) + i, prefs.getString(getString(R.string.pref_domain_key) + (i+1), null));
editor.putString(getString(R.string.pref_proxy_key) + i, prefs.getString(getString(R.string.pref_proxy_key) + (i+1), null));
editor.putBoolean(getString(R.string.pref_enable_outbound_proxy_key) + i, prefs.getBoolean(getString(R.string.pref_enable_outbound_proxy_key) + (i+1), false));
+ editor.putBoolean(getString(R.string.pref_disable_account_key) + i, prefs.getBoolean(getString(R.string.pref_disable_account_key) + (i+1), false));
}
int lastAccount = nbAccounts - 1;
@@ -99,6 +105,7 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity {
editor.putString(getString(R.string.pref_domain_key) + lastAccount, null);
editor.putString(getString(R.string.pref_proxy_key) + lastAccount, null);
editor.putBoolean(getString(R.string.pref_enable_outbound_proxy_key) + lastAccount, false);
+ editor.putBoolean(getString(R.string.pref_disable_account_key) + lastAccount, false);
int defaultAccount = prefs.getInt(getString(R.string.pref_default_account), 0);
if (defaultAccount > n) {
@@ -138,6 +145,7 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity {
category.addPreference(domain);
category.addPreference(proxy);
category.addPreference(outboundProxy);
+ category.addPreference(disable);
category.addPreference(mainAccount);
category.addPreference(delete);
}
diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java
index 42bd32e4d..780ec212b 100755
--- a/src/org/linphone/VideoCallActivity.java
+++ b/src/org/linphone/VideoCallActivity.java
@@ -480,7 +480,8 @@ public class VideoCallActivity extends Activity implements
params.setMargins(0, 0, 15, 15);
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
- mVideoCaptureViewReady.setLayoutParams(params);
+ if (mVideoViewReady != null)
+ mVideoCaptureViewReady.setLayoutParams(params);
}
public void onConfigurationChanged(Configuration newConfig) {
diff --git a/src/org/linphone/ui/Digit.java b/src/org/linphone/ui/Digit.java
index 050a67d53..83e74661a 100644
--- a/src/org/linphone/ui/Digit.java
+++ b/src/org/linphone/ui/Digit.java
@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.linphone.ui;
+import org.linphone.DialerActivity;
import org.linphone.LinphoneManager;
import org.linphone.LinphoneService;
import org.linphone.R;
@@ -103,9 +104,8 @@ public class Digit extends Button implements AddressAware {
LinphoneCore lc = LinphoneManager.getLc();
lc.stopDtmf();
mIsDtmfStarted =false;
- if (lc.isIncall()) {
+ if (lc.isIncall() && !DialerActivity.instance().mVisible) {
lc.sendDtmf(mKeyCode.charAt(0));
-// return;
}
}
diff --git a/submodules/externals/build/exosip/Android.mk b/submodules/externals/build/exosip/Android.mk
index 979de4b82..70639065f 100755
--- a/submodules/externals/build/exosip/Android.mk
+++ b/submodules/externals/build/exosip/Android.mk
@@ -57,6 +57,8 @@ LOCAL_CFLAGS += \
-include $(LOCAL_PATH)/../build/exosip/libeXosip2_AndroidConfig.h \
-DOSIP_MT \
-DENABLE_TRACE \
+ -DSOCKET_TIMEOUT=50 \
+ -DSOCKET_PROGRESS_TIMEOUT=300 \
-include $(LOCAL_PATH)/include/eXosip2/eXosip_transport_hook.h
diff --git a/submodules/externals/exosip b/submodules/externals/exosip
index b3e55a3c9..41a93903b 160000
--- a/submodules/externals/exosip
+++ b/submodules/externals/exosip
@@ -1 +1 @@
-Subproject commit b3e55a3c93b39af43666acec45191b41f2016fa0
+Subproject commit 41a93903b96ec4466f5efa9e9f887a1cce92648a