Add Do not to pause the current call on incoming GSM call before we off hook

This commit is contained in:
Erwan Croze 2017-02-01 15:27:45 +01:00
parent 8889403696
commit 31fde0bbc9

View file

@ -25,7 +25,7 @@ import android.telephony.TelephonyManager;
/**
* Pause current SIP calls when GSM phone rings or is active.
*
*
* @author Guillaume Beraudo
*
*/
@ -34,11 +34,10 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
final String extraState = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
if (TelephonyManager.EXTRA_STATE_RINGING.equals(extraState) || TelephonyManager.EXTRA_STATE_OFFHOOK.equals(extraState)) {
if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(extraState)) {
LinphoneManager.setGsmIdle(false);
if (!LinphoneManager.isInstanciated()) {
if (!LinphoneManager.isInstanciated())
return;
}
LinphoneManager.getLc().pauseAllCalls();
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
LinphoneManager.setGsmIdle(true);