--- a/phoneapp/phoneuicontrol/src/cphonestateincoming.cpp Fri Sep 03 13:33:36 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphonestateincoming.cpp Fri Sep 17 17:09:12 2010 +0300
@@ -147,7 +147,7 @@
{
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::HandleNumberEntryClearedL ()" );
- iCbaManager->UpdateIncomingCbaL( iRingingCallId );
+ UpdateUiCommands();
}
// -----------------------------------------------------------
@@ -170,8 +170,7 @@
{
iStateMachine->SendPhoneEngineMessage(
MPEPhoneModel::EPEMessageTerminateAllConnections );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
- if ( CPhoneState::IsNumberEntryUsedL() )
+ if ( iNumberEntryManager->IsNumberEntryUsedL() )
{
iViewCommandHandle->ExecuteCommandL(
EPhoneViewRemoveNumberEntry );
@@ -188,7 +187,7 @@
break;
case EKeyYes: // send-key
- if( CPhoneState::IsNumberEntryVisibleL() )
+ if( iNumberEntryManager->IsNumberEntryVisibleL() )
{
HandleSendL();
}
@@ -205,12 +204,6 @@
}
break;
- case EKeyDeviceF:
- __PHONELOG( EBasic, EPhoneUIStates,
- "CPhoneConferenceAndSingleAndWaiting::HandleKeyMessageL-deviceF" );
- HandleHoldSwitchL();
- break;
-
default:
break;
}
@@ -222,7 +215,7 @@
//
void CPhoneStateIncoming::HandleSendL()
{
- HBufC* phoneNumber = PhoneNumberFromEntryLC();
+ HBufC* phoneNumber = iNumberEntryManager->PhoneNumberFromEntryLC();
TPtr ptr( phoneNumber->Des() );
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr );
@@ -234,7 +227,7 @@
{
// Send a manual control sequence by providing number
// information with dial command
- CPhoneState::CallFromNumberEntryL();
+ iNumberEntryManager->CallFromNumberEntryL();
}
else
{
@@ -263,6 +256,11 @@
case MEngineMonitor::EPEMessageConnected:
HandleConnectedL( aCallId );
break;
+
+ case MEngineMonitor::EPEMessageDisconnecting:
+ iCallDisconnected = ETrue;
+ CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId );
+ break;
case MEngineMonitor::EPEMessageInValidEmergencyNumber:
AnswerCallL();
@@ -294,7 +292,10 @@
break;
case MEngineMonitor::EPEMessageRemotePartyInfoChanged:
- UpdateRemoteInfoDataAndLabelL( aCallId, UpdateCallHeaderInfoL( aCallId ) );
+ if(!iCallDisconnected)
+ {
+ UpdateRemoteInfoDataAndLabelL( aCallId );
+ }
break;
default:
@@ -308,15 +309,13 @@
// -----------------------------------------------------------
//
void CPhoneStateIncoming::UpdateRemoteInfoDataAndLabelL(
- TInt aCallId,
- TPhoneCmdParamCallHeaderData aCallHeaderParam )
+ TInt aCallId )
{
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::UpdateRemoteInfoDataAndLabelL ()" );
iViewCommandHandle->ExecuteCommandL(
EPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel,
- aCallId,
- &aCallHeaderParam );
+ aCallId );
}
// -----------------------------------------------------------
@@ -333,32 +332,16 @@
&globalNotifierParam );
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
&globalNotifierParam );
-
+
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
-
- // For keeping video call on top!
- if( IsVideoCall( aCallId ) && !IsAutoLockOn() )
- {
- TPhoneCmdParamBoolean booleanParam;
- booleanParam.SetBoolean( EFalse );
- iViewCommandHandle->ExecuteCommandL(
- EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam );
- }
- if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && iStateMachine->PhoneStorage()->IsScreenLocked() )
- {
- EnableCallUIL();
- }
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
BeginUiUpdateLC();
UpdateSingleActiveCallL( aCallId );
- SetTouchPaneButtons( EPhoneIncallButtons );
+ UpdateUiCommands();
SetBackButtonActive(ETrue);
EndUiUpdate();
- iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA );
iStateMachine->ChangeState( EPhoneStateSingle );
}
@@ -370,11 +353,7 @@
{
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::HandleAudioPlayStoppedL ()" );
- iCbaManager->SetRingtoneSilencedStatus( ETrue );
- TInt resourceId = iCbaManager->SoftRejectStatus() ?
- EPhoneCallHandlingIncomingSoftRejectCBA:
- EPhoneCallHandlingIncomingRejectCBA;
- iCbaManager->SetCbaL( resourceId );
+ UpdateUiCommands();
}
// -----------------------------------------------------------
@@ -386,12 +365,6 @@
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::HandleIdleL ()" );
BeginUiUpdateLC();
- if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && iStateMachine->PhoneStorage()->IsScreenLocked() )
- {
- EnableCallUIL();
- }
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
@@ -403,34 +376,15 @@
&globalNotifierParam );
SetDefaultFlagsL();
- if ( IsNumberEntryUsedL() )
+ if ( !iNumberEntryManager->SetVisibilityIfNumberEntryUsedL( ETrue ) )
{
- if ( NeedToSendToBackgroundL() )
- {
- iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
- iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
- }
- else
- {
- SetNumberEntryVisibilityL(ETrue);
- }
- }
- else if ( NeedToSendToBackgroundL() )
- {
- // Continue displaying current app but set up the
- // idle screen in the background.
- SetupIdleScreenInBackgroundL();
- }
- else
- {
- DisplayIdleScreenL();
+ RemoveDialogsAndSendPhoneToBackgroundL();
}
DeleteTouchPaneButtons();
SetBackButtonActive(ETrue);
EndUiUpdate();
- iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
iStateMachine->ChangeState( EPhoneStateIdle );
}
@@ -500,7 +454,6 @@
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::AnswerCallL ()" );
iViewCommandHandle->ExecuteCommandL( EPhoneViewMuteRingToneOnAnswer );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageAnswer );
}
@@ -513,7 +466,6 @@
__LOGMETHODSTARTEND(EPhoneControl,
"CPhoneStateIncoming::DisconnectWaitingCallL ()" );
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
// The ringing call might have changed
TPhoneCmdParamCallStateData callStateData;
@@ -547,6 +499,8 @@
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageRelease );
}
ShowDisconnectingL( iRingingCallId );
+
+ iCallDisconnected = ETrue;
}
// -----------------------------------------------------------
@@ -561,7 +515,7 @@
iStateMachine->SendPhoneEngineMessage(
MPEPhoneModel::EPEMessageStopTonePlay );
- iCbaManager->SetSoftRejectStatus( EFalse );
+ iUiCommandManager->SetSoftRejectStatus( EFalse );
// Re-enable global notes. Otherwise message editor is not opened.
TPhoneCmdParamBoolean globalNotifierParam;
@@ -569,7 +523,7 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
&globalNotifierParam );
- iCbaManager->SetCbaL( EPhoneCallHandlingIncomingSoftRejectCBA );
+ UpdateUiCommands();
TPhoneCmdParamSfiData sfiDataParam;
if ( iStateMachine->PhoneEngineInfo()->RemoteName( iRingingCallId ).Length() )
@@ -622,42 +576,9 @@
void CPhoneStateIncoming::ShowDisconnectingL( TInt aCallId )
{
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIncoming::ShowDisconnectingL( ) ");
- TPhoneCmdParamCallHeaderData callHeaderParam;
- callHeaderParam.SetCallState( EPEStateDisconnecting );
- TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
- TInt callLabelId = CPhoneMainResourceResolver::Instance()->
- ResolveResourceID( EPhoneInCallDisconnected );
- StringLoader::Load( labelText, callLabelId, CCoeEnv::Static() );
- callHeaderParam.SetLabelText( labelText );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
- &callHeaderParam );
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId);
}
-// ---------------------------------------------------------
-// CPhoneStateIncoming::HandleKeyLockEnabledL
-// ---------------------------------------------------------
-//
-EXPORT_C void CPhoneStateIncoming::HandleKeyLockEnabled( TBool aKeylockEnabled )
- {
- __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIncoming::HandleKeyLockEnabledL( ) ");
- if( !FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && CPhoneCenRepProxy::Instance()->
- IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) )
- {
- if( aKeylockEnabled )
- {
- if( iStateMachine->PhoneStorage()->IsBlockedKeysListEmpty() )
- {
- DisableHWKeysL();
- }
- }
- else
- {
- // Reset blocked keys list
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
- }
- }
- }
// End of File