Dialier's end of call issue fixed

This commit is contained in:
Sylvain Berfini 2011-09-29 10:44:13 +02:00
parent f53ebaf9de
commit 2a0d7ada5b

View file

@ -416,7 +416,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
enterIncallMode(lc); enterIncallMode(lc);
} }
}else if (state==LinphoneCall.State.Error){ }else if (state==LinphoneCall.State.Error){
if (mCurrentCall==call){ if (lc.getCurrentCall()==call){
if (mWakeLock.isHeld()) mWakeLock.release(); if (mWakeLock.isHeld()) mWakeLock.release();
showToast(R.string.call_error, message); showToast(R.string.call_error, message);
exitCallMode(); exitCallMode();
@ -424,7 +424,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
mCurrentCall=null; mCurrentCall=null;
} }
}else if (state==LinphoneCall.State.CallEnd){ }else if (state==LinphoneCall.State.CallEnd){
if (mCurrentCall==call){ if (lc.getCurrentCall() == null || lc.getCurrentCall()==call){
exitCallMode(); exitCallMode();
LinphoneActivity.instance().stopOrientationSensor(); LinphoneActivity.instance().stopOrientationSensor();
mCurrentCall=null; mCurrentCall=null;