Merge branch 'master' of git.linphone.org:linphone-android
This commit is contained in:
commit
2715cb4ea7
10 changed files with 42 additions and 12 deletions
|
@ -17,6 +17,7 @@
|
|||
<bool name="allow_edit_in_dialer">true</bool>
|
||||
<color name="conf_active_bg_color">#191970</color>
|
||||
|
||||
<bool name="forbid_self_call">false</bool>
|
||||
<string name="about_bugreport_email">linphone-android@belledonne-communications.com</string>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<resources>
|
||||
<!-- Do not translate any of the strings below -->
|
||||
|
||||
<string name="pref_disable_account_key">pref_disable_account_key</string>
|
||||
|
||||
<string name="pref_tunnel_key">pref_tunnel_key</string>
|
||||
<string name="pref_tunnel_mode_key">pref_tunnel_mode_key</string>
|
||||
<string name="tunnel_mode_entry_value_disabled">disabled</string>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="pref_disable_account">Disable</string>
|
||||
|
||||
<string name="pref_tunnel">Tunnel</string>
|
||||
<string name="pref_tunnel_host">Hostname</string>
|
||||
<string name="pref_tunnel_port">Port</string>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -676,6 +676,9 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
|
||||
// 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) {
|
||||
|
|
|
@ -78,6 +78,11 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -480,6 +480,7 @@ public class VideoCallActivity extends Activity implements
|
|||
params.setMargins(0, 0, 15, 15);
|
||||
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
|
||||
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
if (mVideoViewReady != null)
|
||||
mVideoCaptureViewReady.setLayoutParams(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
submodules/externals/build/exosip/Android.mk
vendored
2
submodules/externals/build/exosip/Android.mk
vendored
|
@ -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
|
||||
|
||||
|
||||
|
|
2
submodules/externals/exosip
vendored
2
submodules/externals/exosip
vendored
|
@ -1 +1 @@
|
|||
Subproject commit b3e55a3c93b39af43666acec45191b41f2016fa0
|
||||
Subproject commit 41a93903b96ec4466f5efa9e9f887a1cce92648a
|
Loading…
Reference in a new issue