Add Do not to pause the current call on incoming GSM call before we off hook
This commit is contained in:
parent
8889403696
commit
31fde0bbc9
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue