Dialer exitCall() only if no other call

This commit is contained in:
Guillaume Beraudo 2011-10-07 16:13:44 +02:00
parent 1d1b6983b6
commit 5ba1181bad

View file

@ -459,15 +459,15 @@ public class DialerActivity extends Activity implements LinphoneGuiListener, Lin
enterIncallMode(lc); enterIncallMode(lc);
} }
}else if (state==LinphoneCall.State.Error){ }else if (state==LinphoneCall.State.Error){
if (lc.getCurrentCall() == null || lc.getCurrentCall()==call){ showToast(R.string.call_error, message);
if (lc.getCallsNb() == 0){
if (mWakeLock.isHeld()) mWakeLock.release(); if (mWakeLock.isHeld()) mWakeLock.release();
showToast(R.string.call_error, message);
exitCallMode(); exitCallMode();
LinphoneActivity.instance().stopOrientationSensor(); LinphoneActivity.instance().stopOrientationSensor();
mCurrentCall=null; mCurrentCall=null;
} }
}else if (state==LinphoneCall.State.CallEnd){ }else if (state==LinphoneCall.State.CallEnd){
if (lc.getCurrentCall() == null || lc.getCurrentCall()==call){ if (lc.getCallsNb() == 0){
exitCallMode(); exitCallMode();
LinphoneActivity.instance().stopOrientationSensor(); LinphoneActivity.instance().stopOrientationSensor();
mCurrentCall=null; mCurrentCall=null;