--- a/phoneapp/phoneuicontrol/src/cphonestateincoming.cpp Mon Oct 04 16:06:10 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphonestateincoming.cpp Fri Oct 15 12:58:46 2010 +0300
@@ -34,7 +34,6 @@
#include "tphonecmdparamboolean.h"
#include "tphonecmdparamcallheaderdata.h"
#include "tphonecmdparaminteger.h"
-#include "tphonecmdparamcallstatedata.h"
#include "tphonecmdparamringtone.h"
#include "tphonecmdparamsfidata.h"
#include "tphonecmdparamstring.h"
@@ -54,6 +53,7 @@
#include "cphonereleasecommand.h"
#include "mphonecustomization.h"
#include "mphonestorage.h"
+#include "phonecallutil.h"
// ================= MEMBER FUNCTIONS =======================
@@ -88,15 +88,12 @@
{
CPhoneState::BaseConstructL();
- // Fetch incoming call's id from view
- TPhoneCmdParamCallStateData callStateData;
- callStateData.SetCallState( EPEStateRinging );
- iViewCommandHandle->HandleCommandL(
- EPhoneViewGetCallIdByState, &callStateData );
- if( callStateData.CallId() > KErrNotFound )
+ // Fetch incoming call's id
+ TInt callId = PhoneCallUtil::CallIdByState( EPEStateRinging );
+ if( callId > KErrNotFound )
{
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
- iRingingCallId = callStateData.CallId();
+ iRingingCallId = callId;
}
else
{
@@ -322,6 +319,11 @@
SetBackButtonActive(ETrue);
EndUiUpdate();
+ if ( PhoneCallUtil::IsVideoCall( aCallId ) )
+ {
+ iViewCommandHandle->ExecuteCommand( EPhoneViewSetVideoCallOnTop );
+ }
+
iStateMachine->ChangeState( EPhoneStateSingle );
}
@@ -442,15 +444,11 @@
"CPhoneStateIncoming::DisconnectWaitingCallL ()" );
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
- // The ringing call might have changed
- TPhoneCmdParamCallStateData callStateData;
- callStateData.SetCallState( EPEStateRinging );
- iViewCommandHandle->HandleCommandL(
- EPhoneViewGetCallIdByState, &callStateData );
-
- if ( callStateData.CallId() > KErrNotFound )
+ // The ringing call might have changed
+ TInt callId = PhoneCallUtil::CallIdByState( EPEStateRinging );
+ if ( callId > KErrNotFound )
{
- iRingingCallId = callStateData.CallId();
+ iRingingCallId = callId;
}
iStateMachine->SetCallId( iRingingCallId );
@@ -507,35 +505,6 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenSoftRejectEditor, &sfiDataParam );
}
-
-// -----------------------------------------------------------
-// CPhoneStateIncoming::GetNumberEntryVisibleMenuBar
-// -----------------------------------------------------------
-//
-TInt CPhoneStateIncoming::GetNumberEntryVisibleMenuBar()
- {
- TInt resource(EPhoneIncomingCallMenubarWithNumberEntry);
- if( IsVideoCall ( iRingingCallId ) )
- {
- resource = EPhoneIncomingVideoCallMenubarWithNumberEntry;
- }
- return resource;
- }
-
-// -----------------------------------------------------------
-// CPhoneStateIncoming::GetNumberEntryNotVisibleMenuBar
-// -----------------------------------------------------------
-//
-TInt CPhoneStateIncoming::GetNumberEntryNotVisibleMenuBar()
- {
- TInt resource(EPhoneIncomingCallMenubar);
- if( IsVideoCall ( iRingingCallId ) )
- {
- resource = EPhoneIncomingVideoCallMenubar;
- }
- return resource;
- }
-
// -----------------------------------------------------------
// CPhoneStateIncoming::ShowDisconnectingL
// -----------------------------------------------------------