[DoubleCall] fix GSM/SIP double call behavior

This commit is contained in:
Brieuc Viel 2017-10-11 12:13:17 +02:00
parent a2bc717d8c
commit 71a8005f55
2 changed files with 3 additions and 2 deletions

View file

@ -345,7 +345,8 @@ public final class LinphoneService extends Service {
} }
if (state == LinphoneCall.State.IncomingReceived) { if (state == LinphoneCall.State.IncomingReceived) {
onIncomingReceived(); if(! LinphoneManager.getInstance().getCallGsmON())
onIncomingReceived();
} }
if (state == State.CallEnd || state == State.CallReleased || state == State.Error) { if (state == State.CallEnd || state == State.CallReleased || state == State.Error) {

View file

@ -35,7 +35,7 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver {
if (!LinphoneManager.isInstanciated()) if (!LinphoneManager.isInstanciated())
return; return;
if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(extraState)) { if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(extraState) || TelephonyManager.EXTRA_STATE_RINGING.equals(extraState)) {
LinphoneManager.getInstance().setCallGsmON(true); LinphoneManager.getInstance().setCallGsmON(true);
LinphoneManager.getLc().pauseAllCalls(); LinphoneManager.getLc().pauseAllCalls();
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) { } else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {