--- a/phoneapp/phoneuistates/src/cphonetwosingles.cpp Thu Aug 19 09:54:27 2010 +0300
+++ b/phoneapp/phoneuistates/src/cphonetwosingles.cpp Tue Aug 31 15:14:29 2010 +0300
@@ -17,7 +17,6 @@
// INCLUDES
-#include <ScreensaverInternalPSKeys.h>
#include <eikmenub.h>
#include <eikenv.h>
#include <StringLoader.h>
@@ -40,7 +39,6 @@
#include "tphonecmdparamcallstatedata.h"
#include "phonestatedefinitionsgsm.h"
#include "phonelogger.h"
-#include "cphonepubsubproxy.h"
// ================= MEMBER FUNCTIONS =======================
@@ -80,11 +78,6 @@
globalNotifierParam.SetBoolean( EFalse );
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
&globalNotifierParam );
-
- CPhonePubSubProxy::Instance()->ChangePropertyValue(
- KPSUidScreenSaver,
- KScreenSaverAllowScreenSaver,
- EPhoneScreensaverAllowed );
}
// -----------------------------------------------------------
@@ -145,47 +138,6 @@
break;
}
}
-
-// -----------------------------------------------------------
-// CPhoneTwoSingles::OpenMenuBarL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneTwoSingles::OpenMenuBarL()
- {
- __LOGMETHODSTARTEND( EPhoneUIStates,
- "CPhoneTwoSingles::OpenMenuBarL()");
- TInt resourceId;
-
- if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
- {
- resourceId = EPhoneDtmfDialerMenubar;
- }
- if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
- {
- resourceId = CustomizedDialerMenuResourceIdL();
- }
- else if ( IsNumberEntryVisibleL() )
- {
- resourceId = EPhoneCallActiveAndHeldMenubarWithNumberEntry;
- }
- else
- {
- resourceId = EPhoneCallActiveAndHeldMenubar;
- }
-
- TPhoneCmdParamInteger integerParam;
- integerParam.SetInteger(
- CPhoneMainResourceResolver::Instance()->
- ResolveResourceID( resourceId ) );
-
- // Set Hold flag to view
- TPhoneCmdParamBoolean holdFlag;
- holdFlag.SetBoolean( EFalse );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
-
- iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen,
- &integerParam );
- }
// -----------------------------------------------------------
// CPhoneTwoSingles:HandleIdleL
@@ -207,12 +159,18 @@
switch( activeCallCount.Integer() )
{
case EOneActiveCall:
- {
- // Close menu bar if number entry is not open.
- iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
+ {
+ if ( IsNumberEntryUsedL() )
+ {
+ // Show the number entry if it exists
+ SetNumberEntryVisibilityL(ETrue);
+ }
+ else
+ {
- // Set incall CBAs
- UpdateCbaL( EPhoneCallHandlingInCallCBA );
+ // Set incall CBAs
+ UpdateCbaL( EPhoneCallHandlingInCallCBA );
+ }
TPhoneCmdParamCallStateData callStateData;
callStateData.SetCallState( EPEStateHeld );
@@ -236,7 +194,7 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
- SetTouchPaneButtons( EPhoneIncallButtons );
+ SetTouchPaneButtons( EPhoneIncallButtons );
// Go to single state
// CBA updates in above if-else conditions
iStateMachine->ChangeState( EPhoneStateSingle );
@@ -295,6 +253,8 @@
callHeaderParam.SetCallState( EPEStateConnected );
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
&callHeaderParam );
+
+ SetTouchPaneButtons( EPhoneIncallButtons );
}
// -----------------------------------------------------------
@@ -321,6 +281,8 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
&callHeaderParam );
+
+ SetTouchPaneButtons( EPhoneIncallButtons );
}
// -----------------------------------------------------------
@@ -354,7 +316,9 @@
conferenceText,
callLabelId,
CCoeEnv::Static() );
- callHeaderParam.SetCLIText( conferenceText, CBubbleManager::ERight );
+ callHeaderParam.SetCLIText( conferenceText, TPhoneCmdParamCallHeaderData::ERight );
+
+ callHeaderParam.SetCallState(EPEStateConnectedConference);
BeginUiUpdateLC();
callHeaderParam.SetCiphering(
@@ -377,7 +341,6 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
SetTouchPaneButtons( EPhoneConferenceButtons );
- SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
EndUiUpdate();
UpdateCbaL( EPhoneCallHandlingInCallCBA );
@@ -396,22 +359,8 @@
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSingles::HandleIncomingL()");
- CPhonePubSubProxy::Instance()->ChangePropertyValue(
- KPSUidScreenSaver,
- KScreenSaverAllowScreenSaver,
- EPhoneScreensaverNotAllowed );
-
- IsNumberEntryUsedL() ?
- BeginTransEffectLC( ECallUiAppear ) :
- BeginTransEffectLC( ENumberEntryOpen );
BeginUiUpdateLC();
- // Hide the number entry if it exists
- if ( IsNumberEntryUsedL() )
- {
- SetNumberEntryVisibilityL( EFalse );
- }
-
TPhoneCmdParamBoolean dialerParam;
dialerParam.SetBoolean( ETrue );
@@ -419,21 +368,21 @@
AllowShowingOfWaitingCallHeaderL( dialerParam );
// Close fast swap window if it's displayed
- EikonEnv()->DismissTaskList();
+ CEikonEnv::Static()->DismissTaskList();
// Display incoming call
DisplayIncomingCallL( aCallId, dialerParam );
- // Set touch controls
- SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
+ // Check if HW Keys or Call UI should be disabled
+ CheckDisableHWKeysAndCallUIL();
SetTouchPaneButtons( EPhoneWaitingCallButtons );
EndUiUpdate();
- EndTransEffect();
// Go to incoming state
- UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
+ iCbaManager->SetCbaL( EPhoneCallHandlingIncomingRejectCBA );
+
iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
}
@@ -443,19 +392,31 @@
//
void CPhoneTwoSingles::DisplayIncomingCallL(
TInt aCallId,
- const TPhoneCmdParamBoolean /*aCommandParam*/ )
+ const TPhoneCmdParamBoolean aCommandParam )
{
__LOGMETHODSTARTEND( EPhoneUIStates,
"CPhoneTwoSingles::DisplayIncomingCallL()");
- // Close menu bar, if it is displayed
- iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
- // Remove any phone dialogs if they are displayed
- iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
+ // Cannot delete active note, e.g. New call query,
+ // but show waiting note with or without caller name
+ if ( IsAnyQueryActiveL() ||
+ ( !aCommandParam.Boolean() && iOnScreenDialer ) )
+ {
+ CallWaitingNoteL( aCallId );
+ }
+ else
+ {
+ // Remove any phone dialogs if they are displayed
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
+ }
// Indicate that the Phone needs to be sent to the background if
// an application other than the top application is in the foreground
- SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
+ TPhoneCmdParamBoolean booleanParam;
+ booleanParam.SetBoolean( !TopAppIsDisplayedL() );
+ iViewCommandHandle->ExecuteCommandL(
+ EPhoneViewSetNeedToSendToBackgroundStatus,
+ &booleanParam );
// Bring Phone app in the foreground
TPhoneCmdParamInteger uidParam;
@@ -477,7 +438,7 @@
EXPORT_C void CPhoneTwoSingles::UpdateInCallCbaL()
{
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneTwoSingles::UpdateInCallCbaL() ");
- UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
+ UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
}
// End of File