--- a/phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp Fri Sep 03 13:33:36 2010 +0300
+++ b/phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp Fri Sep 17 17:09:12 2010 +0300
@@ -113,9 +113,9 @@
{
case EKeyYes: // send-key
{
- if( IsNumberEntryVisibleL() )
+ if( iNumberEntryManager->IsNumberEntryVisibleL() )
{
- CallFromNumberEntryL();
+ iNumberEntryManager->CallFromNumberEntryL();
}
else
{
@@ -134,22 +134,6 @@
}
// -----------------------------------------------------------
-// CPhoneTwoSinglesAndWaiting::HandleKeyEventL
-// -----------------------------------------------------------
-//
-void CPhoneTwoSinglesAndWaiting::HandleKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode /*aEventCode*/ )
- {
- if( EKeyDeviceF == aKeyEvent.iCode )
- {
- __PHONELOG( EBasic, EPhoneUIStates,
- "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL-deviceF" );
- HandleHoldSwitchL();
- }
- }
-
-// -----------------------------------------------------------
// CPhoneTwoSinglesAndWaiting::HandlePhoneEngineMessageL
// -----------------------------------------------------------
//
@@ -165,7 +149,7 @@
HandleIdleL( aCallId );
break;
case MEngineMonitor::EPEMessageConnected:
- UpdateInCallCbaL();
+ UpdateUiCommands();
CPhoneTwoSingles::HandlePhoneEngineMessageL( aMessage, aCallId );
break;
default:
@@ -226,40 +210,10 @@
{
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSinglesAndWaiting::StateTransitionToTwoSinglesL()");
- if ( IsNumberEntryUsedL() )
- {
- if ( NeedToSendToBackgroundL() )
- {
- iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
- UpdateCbaL( EPhoneCallHandlingInCallCBA );
- }
- else
- {
- SetNumberEntryVisibilityL(ETrue);
- }
- }
- else
- {
- // Set Two singles softkeys
- UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
-
- // If numberentry is not open just check NeedToSendToBackgroundL and
- // sendbackround if needed.
- if ( NeedToSendToBackgroundL() )
- {
- iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
- }
- }
-
- if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && iStateMachine->PhoneStorage()->IsScreenLocked() )
- {
- EnableCallUIL();
- }
+ iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue);
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
- SetTouchPaneButtons( EPhoneTwoSinglesButtons );
- iStateMachine->ChangeState( EPhoneStateTwoSingles );
+ UpdateUiCommands();
+ iStateMachine->ChangeState( EPhoneStateTwoSingles );
}
// -----------------------------------------------------------
@@ -270,20 +224,7 @@
{
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL()")
- TPhoneCmdParamInteger callIdParam;
- iViewCommandHandle->ExecuteCommandL(
- EPhoneViewGetExpandedBubbleCallId, &callIdParam );
-
- if ( callIdParam.Integer()!=iRingingCallId )
- {
- CPhoneGsmInCall::UpdateInCallCbaL();
- }
- else
- {
- UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
- }
- CheckDisableHWKeysAndCallUIL();
- SetTouchPaneButtons( EPhoneWaitingCallButtons );
+ UpdateUiCommands();
iStateMachine->ChangeState( EPhoneStateWaitingInSingle );
}
@@ -296,65 +237,12 @@
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSinglesAndWaiting::HandleConnectedConferenceL()");
BeginUiUpdateLC();
-
- TInt callLabelId;
- TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
- callLabelId = CPhoneMainResourceResolver::Instance()->
- ResolveResourceID( EPhoneCLIConferenceCall );
- StringLoader::Load(
- conferenceText,
- callLabelId,
- CCoeEnv::Static() );
-
- TPhoneCmdParamCallHeaderData callHeaderParam;
- callHeaderParam.SetCLIText( conferenceText, TPhoneCmdParamCallHeaderData::ERight );
- callHeaderParam.SetCallState(EPEStateConnectedConference);
- callHeaderParam.SetCiphering(
- iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) );
- callHeaderParam.SetCipheringIndicatorAllowed(
- iStateMachine->PhoneEngineInfo()->SecureSpecified() );
- // Service identifier must be given so that service specific settings
- // can be taken into account at phoneuiview.
- callHeaderParam.SetServiceId(
- iStateMachine->PhoneEngineInfo()->ServiceId( aCallId ) );
-
- CheckDisableHWKeysAndCallUIL();
- iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId,
- &callHeaderParam );
-
- // Clear the flag
- TPhoneCmdParamBoolean booleanParam;
- booleanParam.SetBoolean( EFalse );
- iViewCommandHandle->ExecuteCommandL(
- EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam );
-
- SetTouchPaneButtons( EPhoneWaitingCallButtons );
- UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId );
+ UpdateUiCommands();
EndUiUpdate();
iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting );
}
-
-// -----------------------------------------------------------
-// CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL
-// -----------------------------------------------------------
-//
-void CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL()
- {
- __LOGMETHODSTARTEND( EPhoneUIStates,
- "CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL()");
- TPhoneCmdParamInteger callIdParam;
- iViewCommandHandle->ExecuteCommandL(
- EPhoneViewGetExpandedBubbleCallId, &callIdParam );
- if ( callIdParam.Integer()!=iRingingCallId )
- {
- CPhoneGsmInCall::UpdateInCallCbaL();
- }
- else
- {
- iCbaManager->SetCbaL( EPhoneCallHandlingIncomingRejectCBA );
- }
- }
// -----------------------------------------------------------
// CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL()
@@ -364,7 +252,7 @@
{
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL()");
- UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
+ UpdateUiCommands();
}
// -----------------------------------------------------------
@@ -397,7 +285,7 @@
void CPhoneTwoSinglesAndWaiting::UpdateUiControlsL()
{
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndWaiting::UpdateUiControlsL( ) ");
- UpdateInCallCbaL();
+ UpdateUiCommands();
}
// End of File