[DoubleCall] fix GSM/SIP double call behavior
This commit is contained in:
parent
a2bc717d8c
commit
71a8005f55
2 changed files with 3 additions and 2 deletions
|
@ -345,7 +345,8 @@ public final class LinphoneService extends Service {
|
|||
}
|
||||
|
||||
if (state == LinphoneCall.State.IncomingReceived) {
|
||||
onIncomingReceived();
|
||||
if(! LinphoneManager.getInstance().getCallGsmON())
|
||||
onIncomingReceived();
|
||||
}
|
||||
|
||||
if (state == State.CallEnd || state == State.CallReleased || state == State.Error) {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver {
|
|||
if (!LinphoneManager.isInstanciated())
|
||||
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.getLc().pauseAllCalls();
|
||||
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
|
||||
|
|
Loading…
Reference in a new issue