# HG changeset patch # User Pat Downey # Date 1274195059 -3600 # Node ID 367ca2321732aeb87387a0230b4e22bdd65db8d8 # Parent ba54057fe0274f0d1dc8d2b6ec42e31ff320fa33# Parent a2e87f73f7d78b9254a7e68c8392811f36ab8f87 Re-merge fixes for bugs 1614 and 2360. diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def --- a/phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def Tue May 18 16:04:19 2010 +0100 @@ -236,4 +236,5 @@ ??0CPhoneStateMachine@@IAE@PAVMPhoneViewCommandHandle@@@Z @ 235 NONAME ; CPhoneStateMachine::CPhoneStateMachine(class MPhoneViewCommandHandle *) ??1CPhoneStateStartup@@UAE@XZ @ 236 NONAME ; CPhoneStateStartup::~CPhoneStateStartup(void) ?HandleKeyMessageL@CPhoneState@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 237 NONAME ; void CPhoneState::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode) + ?ForwardPEMessageToPhoneCustomizationL@CPhoneState@@IAEHHH@Z @ 238 NONAME ; int CPhoneState::ForwardPEMessageToPhoneCustomizationL(int, int) diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def --- a/phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def Tue May 18 16:04:19 2010 +0100 @@ -468,4 +468,5 @@ _ZThn8_N20CPhoneStateCallSetupD0Ev @ 467 NONAME _ZThn8_N20CPhoneStateCallSetupD1Ev @ 468 NONAME _ZThn8_NK11CPhoneState17IsMenuBarVisibleLEv @ 469 NONAME + _ZN11CPhoneState37ForwardPEMessageToPhoneCustomizationLEii @ 470 NONAME diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/group/phoneuicontrol.mmp --- a/phoneapp/phoneuicontrol/group/phoneuicontrol.mmp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/group/phoneuicontrol.mmp Tue May 18 16:04:19 2010 +0100 @@ -80,6 +80,7 @@ LIBRARY connmon.lib // RConnectionMonitor LIBRARY avkon.lib // AknTextUtils LIBRARY ProfileEngine.lib +LIBRARY hal.lib // RemCon LIBRARY remconcoreapi.lib diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/inc/cphonekeyeventforwarder.h --- a/phoneapp/phoneuicontrol/inc/cphonekeyeventforwarder.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/inc/cphonekeyeventforwarder.h Tue May 18 16:04:19 2010 +0100 @@ -245,26 +245,32 @@ */ TInt iScanCode; - /* + /** * Has information of used qwerty keyboard. * Own. */ CPhoneQwertyHandler* iQwertyHandler; - /* + /** * Time of the previous key press. Used for multitap behaviour. */ TTime iPreviousKeyPressTime; - /* + /** * Keycode of the previous keypress. Used for multitap behaviour. */ TInt iPreviousScanCode; - /* + /** * Points to next character in multitap character list. */ TInt iMultitapIndex; + + /** + * True if there has been a key event but not a closing key up event. + * Needed to detect situations where key up event is handled before key event. + */ + TBool iExpectKeyUpEvent; }; #endif // CPHONEKEYEVENTFORWARDER_H diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/inc/cphonestate.h --- a/phoneapp/phoneuicontrol/inc/cphonestate.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/inc/cphonestate.h Tue May 18 16:04:19 2010 +0100 @@ -725,6 +725,15 @@ */ IMPORT_C TInt CustomizedDialerCbaResourceIdL(); + /** + * Forwards Phone Engine messages to Phone customization + * @param aMessage Message from Phone Engine + * @param aCallId Call id the message concerns + * @return ETrue if message was handled + */ + IMPORT_C TBool ForwardPEMessageToPhoneCustomizationL( + const TInt aMessage, + TInt aCallId ); protected: // NumberEntry functions. diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/src/cphonecbamanager.cpp --- a/phoneapp/phoneuicontrol/src/cphonecbamanager.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/src/cphonecbamanager.cpp Tue May 18 16:04:19 2010 +0100 @@ -296,10 +296,14 @@ else { - if ( securityMode ) - { - incomingCbaResourceId = EPhoneCallHandlingIncomingRejectCBA; - } + if ( securityMode && callIsAlerting ) + { + incomingCbaResourceId = GetIncomingCallSilenceCBA( softRejectActivated ); + } + else if ( securityMode ) + { + incomingCbaResourceId = EPhoneCallHandlingIncomingRejectCBA; + } else if ( callIsAlerting ) { incomingCbaResourceId = GetIncomingCallSilenceCBA( softRejectActivated ); @@ -461,9 +465,9 @@ ResolveResourceID( EPhoneIncomingCallButtons ) ); if ( iStateMachine.SecurityMode()->IsSecurityMode() ) - { - ret = EPhoneCallHandlingIncomingRejectCBA; - } + { + ret = EPhoneCallHandlingIncomingCBA; + } else if ( touchpaneButtonsParam.Integer() == R_PHONEUI_INCOMING_CALL_SILENCE_BUTTONS ) { diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/src/cphonekeyeventforwarder.cpp --- a/phoneapp/phoneuicontrol/src/cphonekeyeventforwarder.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/src/cphonekeyeventforwarder.cpp Tue May 18 16:04:19 2010 +0100 @@ -141,6 +141,9 @@ "CPhoneKeyEventForwarder::OfferKeyEventL"); TKeyResponse ret( EKeyWasNotConsumed ); + + // After event key, expect to have key up event. + iExpectKeyUpEvent = ( aType == EEventKey ); ret = OfferKeyEventBeforeControlStackL( aKeyEvent, aType ); @@ -150,8 +153,16 @@ TKeyEvent keyEvent = aKeyEvent; keyEvent.iCode = iKeyPressedDown; - // Start and stop dtmf - iStateMachine->State()->HandleDtmfKeyToneL( keyEvent, aType ); + // Do not handle dtmf tone if the type is EEventKey but we are not + // expecting key up event. This happens if the key up event has been + // handled by some CActiveSchedulerWait object somewhere in the execution + // of function OfferKeyEventBeforeControlStackL. + if ( iExpectKeyUpEvent || aType != EEventKey ) + { + // Start and stop dtmf + iStateMachine->State()->HandleDtmfKeyToneL( keyEvent, aType ); + } + // Open number entry view if any allowed character key // is pressed on homescreen or in-call ui if ( aType != EEventKeyUp && IsKeyAllowed( keyEvent ) ) @@ -434,12 +445,27 @@ { iLongPressKeyEventTimer->CancelTimer(); } + + // Don't initiate long tap timer if all these are true + // a) key event is not from virtual dialer + // b) device is in qwerty mode + // c) phone number editor is alpha mode, i.e. not in numeric mode + // This is to prevent phone app's long tap functionality with qwerty + // long presses, and to have the normal editor long press behaviour + // instead. + TBool preventLongTap = + !IsKeySimulatedByTouchDialer( aKeyEvent ) && + iQwertyHandler->IsQwertyInput() && + iViewCommandHandle->HandleCommandL( EPhoneViewIsNumberEntryNumericMode ) != EPhoneViewResponseSuccess; - // Re-start the timer - iLongPressKeyEventTimer->After( - KPhoneLongPressKeyEventDuration, - TCallBack( DoHandleLongPressKeyEventCallbackL, - this ) ); + if ( !preventLongTap ) + { + // Start long press timer + iLongPressKeyEventTimer->After( + KPhoneLongPressKeyEventDuration, + TCallBack( DoHandleLongPressKeyEventCallbackL, + this ) ); + } return ( EKeyWasNotConsumed ); } @@ -499,20 +525,6 @@ } } - // Prevent repeats of DTMF keys anyway - if ( response == EKeyWasNotConsumed ) - { - // Convert event. - keyEvent.iCode = iKeyPressedDown; - if ( aKeyEvent.iRepeats > 0 && - aKeyEvent.iCode != EKeyF18 && // EKeyF18 is used for AknCCPU support - CPhoneKeys::IsDtmfTone( keyEvent, EEventKey ) ) - { - // Do not repeat dtmf characters - response = EKeyWasConsumed; - } - } - return response; } @@ -657,6 +669,7 @@ switch ( aKeyEvent.iScanCode ) { case EStdKeyEnter: + case EStdKeyNkpEnter: aCode = EKeyEnter; break; case EStdKeyYes: diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/src/cphonesecuritymodeobserver.cpp --- a/phoneapp/phoneuicontrol/src/cphonesecuritymodeobserver.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/src/cphonesecuritymodeobserver.cpp Tue May 18 16:04:19 2010 +0100 @@ -205,7 +205,8 @@ iSimState( ESimSecurityStatusUninitialized ), iEngineCurrentSimState( EPESimStatusUninitialized ), iEnginePreviousSimState(EPESimStatusUninitialized ), - iDeviceLockState( EAutolockStatusUninitialized ) + iDeviceLockState( EAutolockStatusUninitialized ), + iSecurityMode( ETrue ) { } diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/src/cphonestate.cpp --- a/phoneapp/phoneuicontrol/src/cphonestate.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/src/cphonestate.cpp Tue May 18 16:04:19 2010 +0100 @@ -55,6 +55,7 @@ #include #include #include +#include #include "phoneui.pan" #include "cphonestate.h" @@ -257,12 +258,7 @@ case MEngineMonitor::EPEMessageCallSecureStatusChanged: HandleCallSecureStatusChangeL( aCallId ); - - if ( iCustomization ) - { - iCustomization->HandlePhoneEngineMessageL( aMessage, - aCallId ); - } + ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); break; case MEngineMonitor::EPEMessageActivateWarrantyMode: @@ -380,11 +376,7 @@ TBool handled( EFalse ); - if ( iCustomization ) - { - handled = iCustomization->HandlePhoneEngineMessageL( - aMessage, aCallId ); - } + handled = ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); if ( EFalse == handled ) { @@ -843,28 +835,39 @@ void CPhoneState::HandleChangedCallDurationL( TInt aCallId ) { __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleChangedCallDurationL() "); - // Get the call duration - TTime time( 0 ); - TTimeIntervalSeconds timeInterval = - iStateMachine->PhoneEngineInfo()->CallDuration( aCallId ); - time += timeInterval; - - // Read format string from AVKON resource - TBuf timeDurationFormatString( KNullDesC ); - LoadResource( timeDurationFormatString, EPhoneCallDurationFormatString ); - - // Format the time - TBuf timeString( KNullDesC ); - time.FormatL( timeString, timeDurationFormatString ); - - // Localize time format - AknTextUtils::LanguageSpecificNumberConversion( timeString ); - - // update the call header call duration - iViewCommandHandle->ExecuteCommandL( - EPhoneViewUpdateCallHeaderCallDuration, - aCallId, - timeString ); + + TInt ret = KErrNone; + TInt isDisplayOn; + + ret = HAL::Get( HALData::EDisplayState, isDisplayOn ); + + // Update only if the display is on or if HAL::Get returns an error, + // in which case display value cannot be trusted. + if ( ret || isDisplayOn ) + { + // Get the call duration + TTime time( 0 ); + TTimeIntervalSeconds timeInterval = + iStateMachine->PhoneEngineInfo()->CallDuration( aCallId ); + time += timeInterval; + + // Read format string from AVKON resource + TBuf timeDurationFormatString( KNullDesC ); + LoadResource( timeDurationFormatString, EPhoneCallDurationFormatString ); + + // Format the time + TBuf timeString( KNullDesC ); + time.FormatL( timeString, timeDurationFormatString ); + + // Localize time format + AknTextUtils::LanguageSpecificNumberConversion( timeString ); + + // update the call header call duration + iViewCommandHandle->ExecuteCommandL( + EPhoneViewUpdateCallHeaderCallDuration, + aCallId, + timeString ); + } } // ----------------------------------------------------------------------------- @@ -4724,8 +4727,8 @@ { TPhoneCmdParamInteger integerParam; integerParam.SetInteger( EPhoneInCallCmdActivateIhf ); - TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( - EPhoneViewEnableToolbarButton, &integerParam )); + iViewCommandHandle->ExecuteCommand( + EPhoneViewEnableToolbarButton, &integerParam ); } } @@ -4778,5 +4781,25 @@ } } +// ----------------------------------------------------------- +// CPhoneState::ForwardPEMessageToPhoneCustomizationL +// Forward Phone Engine messages to Phone customization +// (other items were commented in a header). +// ----------------------------------------------------------- +// +EXPORT_C TBool CPhoneState::ForwardPEMessageToPhoneCustomizationL( + const TInt aMessage, + TInt aCallId ) + { + __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::ForwardPEMessageToPhoneCustomizationL() " ); + TBool handled = EFalse; + + if ( iCustomization ) + { + handled = iCustomization->HandlePhoneEngineMessageL( aMessage, aCallId ); + } + return handled; + } + // End of File diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuicontrol/src/cphonestateincall.cpp --- a/phoneapp/phoneuicontrol/src/cphonestateincall.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuicontrol/src/cphonestateincall.cpp Tue May 18 16:04:19 2010 +0100 @@ -191,6 +191,8 @@ { case MEngineMonitor::EPEMessageIdle: HandleIdleL( aCallId ); + // Forward idle message to phone customization + CPhoneState::ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); break; case MEngineMonitor::EPEMessageAudioMuteChanged: diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuistates/src/cphoneemergency.cpp --- a/phoneapp/phoneuistates/src/cphoneemergency.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuistates/src/cphoneemergency.cpp Tue May 18 16:04:19 2010 +0100 @@ -185,10 +185,7 @@ break; case MEngineMonitor::EPEMessageColpNumberAvailable: - { //Don't show COLP note during emergency call. - return; - } break; default: @@ -240,6 +237,8 @@ // Continue displaying current app but set up the // idle screen in the background SetupIdleScreenInBackgroundL(); + // Update toolbar + iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateToolbar ); } else if ( iOnScreenDialer && IsNumberEntryContentStored() ) @@ -257,6 +256,8 @@ { // Show the number entry if it exists SetNumberEntryVisibilityL(ETrue); + // Update toolbar + iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateToolbar ); } else @@ -380,6 +381,8 @@ SetTouchPaneButtons( EPhoneEmergencyCallButtons ); + SetToolbarDimming( ETrue ); + ShowNoteL( EPhoneEmergencyConnectWaitNote ); UpdateSetupCbaL(); @@ -454,9 +457,6 @@ EndUiUpdate(); - //Make sure that toolbar is not shown - iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); - UpdateInCallCbaL(); } @@ -479,6 +479,7 @@ &emergencyHeaderParam ); EndUiUpdate(); + SetToolbarDimming( ETrue ); UpdateInCallCbaL(); } diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuistates/src/cphoneerrormessageshandler.cpp --- a/phoneapp/phoneuistates/src/cphoneerrormessageshandler.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuistates/src/cphoneerrormessageshandler.cpp Tue May 18 16:04:19 2010 +0100 @@ -395,7 +395,7 @@ case ECCPErrorNoAnswerForVideo: if( IsVideoCall( aErrorInfo.iCallId ) ) { - SendGlobalInfoNoteL( EPhoneNotePhoneOutOf3GCoverage ); + SendGlobalInfoNoteL( EPhoneNoteCallInfoCauseValue16 ); } else { diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/inc/cphoneincallindicator.h --- a/phoneapp/phoneuiview/inc/cphoneincallindicator.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/inc/cphoneincallindicator.h Tue May 18 16:04:19 2010 +0100 @@ -67,12 +67,6 @@ * @param aCommandParam command parameter */ void HandleCipheringChange( TPhoneCommandParam* aCommandParam ); - - - /** - * return is emergency call active - */ - TBool IsEmergencyCall(); private: diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/inc/cphonetoolbarcontroller.h --- a/phoneapp/phoneuiview/inc/cphonetoolbarcontroller.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/inc/cphonetoolbarcontroller.h Tue May 18 16:04:19 2010 +0100 @@ -180,6 +180,9 @@ TBool iCallInProgress; + // Dim activate IHF button + TBool iDimActivateIhf; + }; #endif // CPHONETOOLBARCONTROLLER_H diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/inc/cphoneview.h --- a/phoneapp/phoneuiview/inc/cphoneview.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/inc/cphoneview.h Tue May 18 16:04:19 2010 +0100 @@ -28,6 +28,7 @@ class TPhoneCommandParam; class CEikButtonGroupContainer; class MPhoneViewObserver; +class MPhoneViewControllerObserver; // CLASS DECLARATION @@ -38,7 +39,7 @@ { public: // Constructors and destructor - static CPhoneView* NewL( TRect aRect, CEikButtonGroupContainer& aCba ); + static CPhoneView* NewL( TRect aRect, CEikButtonGroupContainer& aCba, MPhoneViewControllerObserver* aViewController ); virtual ~CPhoneView(); @@ -208,7 +209,7 @@ private: - CPhoneView( CEikButtonGroupContainer& aCba ); + CPhoneView( CEikButtonGroupContainer& aCba, MPhoneViewControllerObserver* aViewController ); void ConstructL( TRect aRect ); @@ -255,7 +256,9 @@ MPhoneViewObserver* iObserver; - TBool iDialerActivation; + TBool iDialerActivation; + + MPhoneViewControllerObserver* iViewControllerObserver; }; #endif // __CPHONEVIEW_H diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/inc/cphoneviewcontroller.h --- a/phoneapp/phoneuiview/inc/cphoneviewcontroller.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/inc/cphoneviewcontroller.h Tue May 18 16:04:19 2010 +0100 @@ -36,6 +36,8 @@ #include "mnumberentry.h" #include "mphonesecuritymodechangeobserver.h" +#include "mphoneviewcontrollerobserver.h" + // FORWARD DECLARATIONS class CPhoneButtonsController; class CLogsClient; @@ -79,6 +81,7 @@ class MPhoneViewCustomization; class CPhoneEasyDialingController; class CPhoneDtmfDialerController; +class CAknIncallBubble; class CPhoneViewController : public CBase, @@ -86,7 +89,8 @@ public MPhoneStatusPaneObserver, public MPhoneViewBlockingDialogObserver, public MNumberEntryObserver, - public MPhoneSecurityModeChangeObserver + public MPhoneSecurityModeChangeObserver, + public MPhoneViewControllerObserver { public: // Constructors and destructor @@ -259,6 +263,16 @@ // From MPhoneSecurityModeChangeObserver IMPORT_C void HandleSecurityModeChanged( TBool aIsEnabled ); + + /** + * Sets incall small bubble´s visibility in special cases. + */ + void AllowInCallBubbleInSpecialCases(); + + /** + * Sets value for incall bubble visibility. + */ + void SetIncallBubbleVisibility( TBool aIncallBubbleVisible ); private: // New functions @@ -796,6 +810,8 @@ // Boolean flag. ETrue if the application needs to return // to the foreground after call ended TBool iNeedToReturnToForegroundAppAfterCall; + + CAknIncallBubble* iIncallBubble; }; #endif // CPHONEVIEWCONTROLLER_H diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/inc/mphoneviewcontrollerobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneapp/phoneuiview/inc/mphoneviewcontrollerobserver.h Tue May 18 16:04:19 2010 +0100 @@ -0,0 +1,48 @@ +/* +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: View command handle +* +*/ + +#ifndef MPHONEVIEWCONTROLLEROBSERVER_H_ +#define MPHONEVIEWCONTROLLEROBSERVER_H_ + +// INCLUDES + +// CONSTANTS + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** +* MPhoneViewControllerObserver class +* +* @lib phoneuiview.lib +*/ +class MPhoneViewControllerObserver + { + public: + /** + * Sets incall small bubble´s visibility in special cases. + */ + virtual void AllowInCallBubbleInSpecialCases() = 0; + + /** + * Sets Incall bubble´s visibility. + */ + virtual void SetIncallBubbleVisibility( TBool aIncallBubbleVisible ) = 0; + }; + +#endif /* MPHONEVIEWCONTROLLEROBSERVER_H_ */ diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphonedialercontroller.cpp --- a/phoneapp/phoneuiview/src/cphonedialercontroller.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphonedialercontroller.cpp Tue May 18 16:04:19 2010 +0100 @@ -149,7 +149,8 @@ CPhoneBubbleWrapper* aBubbleWrapper, CCoeEnv& aCoeEnv ): iCoeEnv( aCoeEnv ), - iBubbleWrapper( aBubbleWrapper ) + iBubbleWrapper( aBubbleWrapper ), + iRestrictedDialer( ETrue ) { } diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphoneincallindicator.cpp --- a/phoneapp/phoneuiview/src/cphoneincallindicator.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphoneincallindicator.cpp Tue May 18 16:04:19 2010 +0100 @@ -307,14 +307,5 @@ return KErrNone; } -// --------------------------------------------------------- -// CPhoneIncallIndicator::IsEmergencyCall -// --------------------------------------------------------- -// -TBool CPhoneIncallIndicator::IsEmergencyCall() - { - return iEmergency; - } - // End of File diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphonemenucontroller.cpp --- a/phoneapp/phoneuiview/src/cphonemenucontroller.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphonemenucontroller.cpp Tue May 18 16:04:19 2010 +0100 @@ -56,6 +56,7 @@ CPhoneMenuController::CPhoneMenuController( CEikonEnv& aEikEnv ): iMenuResourceId( 0 ), iOkMenuResourceId( 0 ), + iSecurityMode( ETrue ), iEikEnv( aEikEnv ) { } @@ -227,6 +228,13 @@ { switch( menuItemArray[ i ] ) { + case EPhoneDialerCallSettings: + if ( iSecurityMode ) + { + menuPane->DeleteMenuItem( menuItemArray[ i ] ); + } + break; + case EPhoneInCallCmdAnswer: if ( iConferenceAndWaitingVideoFlag ) { @@ -470,8 +478,8 @@ case EPhoneDialerCallHandling: { - // no active call - if ( onScreenDialer && !iCallInProgress ) + // no active call or security mode + if ( ( onScreenDialer && !iCallInProgress ) || iSecurityMode ) { menuPane->DeleteMenuItem( menuItemArray[i] ); } diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp --- a/phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp Tue May 18 16:04:19 2010 +0100 @@ -131,7 +131,6 @@ CleanupStack::Pop( button ); CleanupStack::PopAndDestroy( tooltipText ); } - TRAP_IGNORE(iToolbar->DisableToolbarL( ETrue )); } } @@ -395,7 +394,17 @@ iWiredAccFlag = accFlag->Boolean(); if ( iCallInProgress ) { - SetToolbarButtonDimmed( EPhoneInCallCmdActivateIhf, iWiredAccFlag ); + if ( iWiredAccFlag ) + { + // Dim toolbar button + iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, ETrue, ETrue ); + } + else if ( !iDimActivateIhf ) + { + // Don't undim ActivateIhf button, if it was intended to be dimmed all the time + iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, EFalse, ETrue ); + } + UpdateToolbar(); } } @@ -452,6 +461,7 @@ { iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, aDimmed, ETrue ); } + iDimActivateIhf = aDimmed; } // --------------------------------------------------------- @@ -462,8 +472,28 @@ { // __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneToolbarController::SetToolbarButtonDimmed()" ); - // Dim toolbar button - iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); + if ( aCommandId == EPhoneInCallCmdActivateIhf ) + { + if ( aDimmed ) + { + // Dim toolbar button + iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); + } + else + { + // Don't undim IHF if wired acc is connected. + if ( !iWiredAccFlag ) + { + iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); + } + } + iDimActivateIhf = aDimmed; + } + else + { + // Dim/undim toolbar button + iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); + } } // END diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphoneview.cpp --- a/phoneapp/phoneuiview/src/cphoneview.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphoneview.cpp Tue May 18 16:04:19 2010 +0100 @@ -38,7 +38,8 @@ #include "cphonestatuspane.h" #include "tphonecmdparambitmap.h" #include "phonelogger.h" -#include "mphoneviewobserver.h" +#include "mphoneviewobserver.h" +#include "mphoneviewcontrollerobserver.h" #include // needed for AKN_LAF_COLOR in 3.0 environment @@ -65,8 +66,10 @@ // might leave. // ----------------------------------------------------------------------------- // -CPhoneView::CPhoneView( CEikButtonGroupContainer& aCba ) : - iCba ( aCba ) +CPhoneView::CPhoneView( CEikButtonGroupContainer& aCba, MPhoneViewControllerObserver* aViewController ) : + iSecurityMode( ETrue ), + iCba ( aCba ), + iViewControllerObserver ( aViewController ) { } @@ -97,9 +100,9 @@ // Two-phased constructor. // ----------------------------------------------------------------------------- // -CPhoneView* CPhoneView::NewL( TRect aRect, CEikButtonGroupContainer& aCba ) +CPhoneView* CPhoneView::NewL( TRect aRect, CEikButtonGroupContainer& aCba, MPhoneViewControllerObserver* aViewController ) { - CPhoneView* self = new ( ELeave ) CPhoneView( aCba ); + CPhoneView* self = new ( ELeave ) CPhoneView( aCba, aViewController ); CleanupStack::PushL( self ); self->ConstructL( aRect ); @@ -138,6 +141,9 @@ const TDesC8& /*aCustomMessage*/ ) { __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneView::ViewActivatedL()"); + + iViewControllerObserver->AllowInCallBubbleInSpecialCases(); + switch ( aCustomMessageId.iUid ) { case KTouchDiallerViewCommand: @@ -186,7 +192,7 @@ { __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneView::ViewDeactivated()"); SetActivatePreviousApp( EFalse ); - + iViewControllerObserver->SetIncallBubbleVisibility( EFalse ); DrawDeferred(); } diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuiview/src/cphoneviewcontroller.cpp --- a/phoneapp/phoneuiview/src/cphoneviewcontroller.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuiview/src/cphoneviewcontroller.cpp Tue May 18 16:04:19 2010 +0100 @@ -135,6 +135,7 @@ #include #include +#include // Kastor effect IDs, aknskincontent/101f84b9.sel // These effects cannot be used for internal transitions (Call UI<->Dialer) @@ -151,7 +152,6 @@ // CPhoneViewController::CPhoneViewController() : iEikEnv( *CEikonEnv::Static() ), - iNeedToReturnToForegroundAppAfterCall( EFalse ), iHelpCommand( KINCAL_HLP_CALL_HANDLING ), iBlockingDialogIsDisplayed( EFalse ), iIdleUid( KErrNotFound ), @@ -159,7 +159,9 @@ iEffectOngoing( EFalse ), iSendBack( ETrue ), iDialerActive( EFalse ), - iPriotityChanged( EFalse ) + iPriotityChanged( EFalse ), + iSecurityMode( ETrue ), + iNeedToReturnToForegroundAppAfterCall( EFalse ) { } @@ -180,7 +182,7 @@ iAppui = (CAknAppUi*)iEikEnv.EikAppUi(); iCba = iEikEnv.AppUiFactory()->Cba(); - iPhoneView = CPhoneView::NewL( aRect, *iCba ); + iPhoneView = CPhoneView::NewL( aRect, *iCba, this ); iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect ); @@ -257,6 +259,8 @@ // if you are using sgc-client's session to capserver, //you are not allowed to close the session. iAknUiServerClient = CAknSgcClient::AknSrv(); + + iIncallBubble = CAknIncallBubble::NewL(); } // ----------------------------------------------------------------------------- @@ -329,7 +333,8 @@ // delete iStatusPane; <-- CCoeStatic are destroyed outside application iApaLsSession.Close(); - + + delete iIncallBubble; } // --------------------------------------------------------- @@ -3626,7 +3631,7 @@ // need to do PushDefault for navipane and SwitchLayoutL for // statuspane. if ( currentLayout != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || - currentLayout != R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) + currentLayout != R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) { SwapEmptyIndicatorPaneInSecureStateL( ETrue ); @@ -3641,7 +3646,7 @@ else { iStatusPane->StatusPane().SwitchLayoutL - ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ); + ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); } } } @@ -3651,7 +3656,7 @@ // layout is something else there is no need to do Pop and // SwitchLayoutL for statuspane. if ( currentLayout == R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || - currentLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) + currentLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) { SwapEmptyIndicatorPaneInSecureStateL( EFalse ); @@ -3663,7 +3668,7 @@ else { iStatusPane->StatusPane().SwitchLayoutL - ( R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE ); + ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); } } } @@ -3775,6 +3780,8 @@ __PHONELOG1( EBasic, EPhoneUIView, "CPhoneViewController::SetControltoDialerL iDialerActive (%d)", iDialerActive ); + SetIncallBubbleVisibility( ETrue ); + if ( !iDialerActive ) { iDialerActive = ETrue; @@ -3820,11 +3827,8 @@ __PHONELOG1( EBasic, EPhoneUIView, "CPhoneViewController::SetControltoCallHandlingL iDialerActive (%d)", iDialerActive ); - // Do not show toolbar if emergency call is active - if ( !iIncallIndicator->IsEmergencyCall() ) - { - iToolbarController->ShowToolbar(); - } + SetIncallBubbleVisibility( EFalse ); + iToolbarController->ShowToolbar(); if ( iDialerActive ) { iDialerActive = EFalse; @@ -4084,4 +4088,36 @@ return iNeedToReturnToForegroundAppAfterCall; } +// --------------------------------------------------------------------------- +// CPhoneViewController::AllowInCallBubbleInSpecialCases +// --------------------------------------------------------------------------- +// +void CPhoneViewController::AllowInCallBubbleInSpecialCases() +{ + // this method can be used for special cases like dialer + + if( iDialerActive ) + { + SetIncallBubbleVisibility( ETrue ); + } + else + { + SetIncallBubbleVisibility( EFalse ); + } + +} + +// --------------------------------------------------------------------------- +// CPhoneViewController::SetIncallBubbleVisibility +// --------------------------------------------------------------------------- +// +void CPhoneViewController::SetIncallBubbleVisibility( TBool aVisible ) + { + __PHONELOG1( EBasic, EPhoneUIView, + "CPhoneViewController::SetIncallBubbleVisibility(%d)", + aVisible ); + + TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); + } + // End of File diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h --- a/phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h Tue May 18 16:04:19 2010 +0100 @@ -370,6 +370,25 @@ * @return Phone number */ HBufC* PhoneNumberFromEntryLC() const; + + /** + * Enables or disables key lock. + * @param aEnabled ETrue if keylock is enabled, + * EFalse if disabled. + */ + void SetKeyLockEnabledL( TBool aEnabled ); + + /** + * Keylock was on before and needs to be restored. + * @param aRestore ETrue if keylock needs to be restored. + */ + void SetNeedToRestoreKeyLock( TBool aRestore ); + + /* Check if keylock was on before and needs to be restored. + * @return ETrue if keylock needs to be restored. + */ + TBool NeedToRestoreKeyLock() const; + private: // Data @@ -418,6 +437,12 @@ * Call forward handler. */ CPhoneCallForwardQueryHandler* iCallForwardHandler; + + /** + * Boolean flag. ETrue if keylock was on before and + * needs to be restored. + */ + TBool iNeedToRestoreKeyLock; }; diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp --- a/phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp Tue May 18 16:04:19 2010 +0100 @@ -60,6 +60,7 @@ #include "cphonevcchandler.h" #include "cphonecallforwardqueryhandler.h" #include "cphonekeys.h" +#include "phoneui.hrh" // CONSTANTS const TInt KMaxLengthForSIPURIFirstLine = 15; @@ -385,13 +386,19 @@ handled = ETrue; } break; + case EPhoneCmdUnattendedTransferCallBackCancel: + if ( NeedToRestoreKeyLock() ) + { + SetKeyLockEnabledL( ETrue ); + SetNeedToRestoreKeyLock( EFalse ); + } + // intended fall-through case EPhoneInCallCmdUnattendedTransfer: case EPhoneCmdTransferDialerOk: case EPhoneCmdTransferDialerExit: case EPhoneCmdTransferDialerSearch: case EPhoneCmdTransferDialerContactFetch: case EPhoneCmdUnattendedTransferCallBackOk: - case EPhoneCmdUnattendedTransferCallBackCancel: // intended fall-through iTransferCmdHandler->HandleCommandL( aCommand ); handled = ETrue; @@ -429,6 +436,15 @@ handled = ETrue; break; + case EPhoneCmdRejectUnattendedTransfer: + if ( NeedToRestoreKeyLock() ) + { + SetKeyLockEnabledL( ETrue ); + SetNeedToRestoreKeyLock( EFalse ); + } + handled = ETrue; + break; + default: { RArray array; @@ -598,8 +614,11 @@ case MEngineMonitor::EPEMessageTransferring: { iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); - CPhoneState* phoneState = - static_cast< CPhoneState* >( iStateMachine.State() ); + break; + } + case MEngineMonitor::EPEMessageTransferDone: + { + iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); SendGlobalInfoNoteL( EPhoneInCallTransferred ); break; } @@ -610,9 +629,28 @@ } case MEngineMonitor::EPEMessageTransferCallBackRequest: { + if ( iStateMachine.State()->IsKeyLockOn() ) + { + SetNeedToRestoreKeyLock( ETrue ); + SetKeyLockEnabledL( EFalse ); + } iTransferCmdHandler->LaunchCallBackQueryL(); break; } + case MEngineMonitor::EPEMessageIdle: + { + TPhoneCmdParamInteger activeCallCount; + iViewCommandHandle.ExecuteCommandL( + EPhoneViewGetCountOfActiveCalls, &activeCallCount ); + + if ( ENoActiveCalls == activeCallCount.Integer() + && NeedToRestoreKeyLock() ) + { + SetKeyLockEnabledL( ETrue ); + SetNeedToRestoreKeyLock( EFalse ); + } + break; + } default: handled = EFalse; break; @@ -1530,4 +1568,50 @@ return phoneNumber; } +// --------------------------------------------------------------------------- +// CPhoneCustomizationVoip::SetKeyLockEnabledL +// --------------------------------------------------------------------------- +// +void CPhoneCustomizationVoip::SetKeyLockEnabledL( TBool aEnabled ) + { + __LOGMETHODSTARTEND( PhoneUIVoIPExtension, + "CPhoneCustomizationVoip::CPhoneCustomizationVoip::SetKeyLockEnabledL" ); + if ( aEnabled ) + { + iViewCommandHandle.ExecuteCommandL( + EPhoneViewEnableKeyLock ); + } + else + { + iViewCommandHandle.ExecuteCommandL( + EPhoneViewDisableKeyLockWithoutNote ); + } + } + +// --------------------------------------------------------------------------- +// CPhoneCustomizationVoip::SetNeedToRestoreKeyLock +// --------------------------------------------------------------------------- +// +void CPhoneCustomizationVoip::SetNeedToRestoreKeyLock( TBool aRestore ) + { + __LOGMETHODSTARTEND( PhoneUIVoIPExtension, + "CPhoneCustomizationVoip::CPhoneCustomizationVoip::SetNeedToRestoreKeyLock" ); + __PHONELOG1( EBasic, PhoneUIVoIPExtension, + "CPhoneCustomizationVoip::AwrNeedToRestoreKeyLock:%d", aRestore ); + iNeedToRestoreKeyLock = aRestore; + } + +// ----------------------------------------------------------- +// CPhoneCustomizationVoip::NeedToRestoreKeyLock +// ----------------------------------------------------------- +// +TBool CPhoneCustomizationVoip::NeedToRestoreKeyLock() const + { + __LOGMETHODSTARTEND( PhoneUIVoIPExtension, + "CPhoneCustomizationVoip::CPhoneCustomizationVoip::NeedToRestoreKeyLock" ); + __PHONELOG1( EBasic, PhoneUIVoIPExtension, + "CPhoneCustomizationVoip::NeedToRestoreKeyLock:%d", iNeedToRestoreKeyLock ); + return iNeedToRestoreKeyLock; + } + // End of File diff -r a2e87f73f7d7 -r 367ca2321732 phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp --- a/phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp Tue May 18 16:04:19 2010 +0100 @@ -114,7 +114,9 @@ { case MEngineMonitor::EPEMessageUnattendedTransferRequest: LaunchUnattendedTransferAcceptanceQueryL(); - break; + // Forward message to phone customization + CPhoneState::ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId ); + break; default: CPhoneSingleCall::HandlePhoneEngineMessageL( aMessage, aCallId ); diff -r a2e87f73f7d7 -r 367ca2321732 phoneengine/PhoneCntFinder/ContactService/inc/CPhCntContactManager.h --- a/phoneengine/PhoneCntFinder/ContactService/inc/CPhCntContactManager.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneengine/PhoneCntFinder/ContactService/inc/CPhCntContactManager.h Tue May 18 16:04:19 2010 +0100 @@ -357,6 +357,12 @@ * Not own. */ MPhCntStoreLoaderObserver* iStoreLoaderObserver; + + /** + * Stored contact store for callback usage. + */ + MVPbkContactStore* iContactStore; + }; #endif // CPHCNTCONTACTMANAGER_H \ No newline at end of file diff -r a2e87f73f7d7 -r 367ca2321732 phoneengine/PhoneCntFinder/ContactService/src/CPhCntContactManager.cpp --- a/phoneengine/PhoneCntFinder/ContactService/src/CPhCntContactManager.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneengine/PhoneCntFinder/ContactService/src/CPhCntContactManager.cpp Tue May 18 16:04:19 2010 +0100 @@ -74,6 +74,7 @@ { TRAP_IGNORE( iContactManager->ContactStoresL().CloseAll( *this ) ); } + delete iContactStore; delete iContactManager; delete iContactStoreUris; } @@ -360,6 +361,12 @@ // void CPhCntContactManager::OpenComplete() { + if ( iStoreLoaderObserver ) + { + iStoreLoaderObserver->ContactStoreLoadingCompleted( + iContactStore, KErrNone ); + iStoreLoaderObserver = NULL; + } } // --------------------------------------------------------------------------- @@ -370,17 +377,16 @@ void CPhCntContactManager::StoreReady( MVPbkContactStore& aContactStore ) { + TVPbkContactStoreUriPtr uri = aContactStore.StoreProperties().Uri(); - if ( iStoreLoaderObserver - && !iContactStoreUris->ContactStores().IsIncluded( uri ) ) + if ( !iContactStoreUris->ContactStores().IsIncluded( uri ) ) { TRAP_IGNORE( iContactStoreUris->AddContactStoreL( uri ) ); - - iStoreLoaderObserver->ContactStoreLoadingCompleted( - &aContactStore, KErrNone ); - iStoreLoaderObserver = NULL; } + + iContactStore = &aContactStore; + iContactStoreUris->StoreReady( uri ); } diff -r a2e87f73f7d7 -r 367ca2321732 phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp --- a/phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneengine/PhoneCntFinder/ContactService/src/cphcntstoreloaderimpl.cpp Tue May 18 16:04:19 2010 +0100 @@ -15,12 +15,17 @@ * */ - +#include #include +#include +#include #include -#include +#include +#include +#include #include "cphcntstoreloaderimpl.h" #include "MPhCntContactManager.h" +#include "cphcntcontactstoreuris.h" // ======== MEMBER FUNCTIONS ======== @@ -176,13 +181,32 @@ // TBool CPhCntStoreLoaderImpl::IsContactStoreLoadedL( const TDesC8& aContactLink ) const - { - CVPbkContactLinkArray* linkArray = CVPbkContactLinkArray::NewLC( - aContactLink, iContactManager.ContactStoresL() ); + { + TBool storeLoaded = EFalse; + CPhCntContactStoreUris& storeUris = iContactManager.ContactStoreUrisL(); + CVPbkContactStoreUriArray* uriArray = storeUris.ActiveContactStoresL(); + CleanupStack::PushL( uriArray ); - TBool storeLoaded( linkArray->Count() != 0 ); - CleanupStack::PopAndDestroy( linkArray ); - + if ( uriArray->Count() > 0 ) + { + MVPbkContactLink* link = iContactManager.ConvertDescriptorToLinkL( aContactLink ); + if( link ) + { + for ( int i=0; iCount();i++ ) + { + if ((*uriArray)[i].Compare( + link->ContactStore().StoreProperties().Uri(), + TVPbkContactStoreUriPtr::EContactStoreUriAllComponents ) + == KErrNone ) + { + storeLoaded = ETrue; + break; + } + } + delete link; + } + } + CleanupStack::PopAndDestroy( uriArray ); return storeLoaded; } diff -r a2e87f73f7d7 -r 367ca2321732 phoneengine/loghandling/inc/cpelogevent.h --- a/phoneengine/loghandling/inc/cpelogevent.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneengine/loghandling/inc/cpelogevent.h Tue May 18 16:04:19 2010 +0100 @@ -236,14 +236,7 @@ * @param aLogInfo Log info containing remote contact. */ void SetRemoteContact( CLogEvent& aEvent, const CPELogInfo& aLogInfo ); - - /** - * Removes from event data the given tag and data attached to it. - * @since S60 v5.1 - * @param aTag Tag to be removed - */ - void RemoveTagFromDataFieldL( const TDesC8& aTag ); - + private: // Data // Owner of the object. CPELogHandling& iOwner; diff -r a2e87f73f7d7 -r 367ca2321732 phoneengine/loghandling/src/cpelogevent.cpp --- a/phoneengine/loghandling/src/cpelogevent.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneengine/loghandling/src/cpelogevent.cpp Tue May 18 16:04:19 2010 +0100 @@ -658,7 +658,12 @@ { if ( KNullDesC() != aLogInfo.Name() ) { - aEvent.SetRemoteParty( aLogInfo.Name() ); + // This if clause fixes ou1cimx1#320365 Wrong address shown in received log entry + if ( aLogInfo.EventType() != CPELogInfo::EPEVoIPEvent || + KNullDesC() == aEvent.RemoteParty() ) + { + aEvent.SetRemoteParty( aLogInfo.Name() ); + } } } @@ -670,22 +675,18 @@ void CPELogEvent::SetRemoteContact( CLogEvent& aEvent, const CPELogInfo& aLogInfo ) { - if ( KNullDesC() != aLogInfo.PhoneNumber() ) + if ( KNullDesC() != aLogInfo.PhoneNumber() ) { - aEvent.SetNumber( aLogInfo.PhoneNumber() ); - - if ( CPELogInfo::EPEVoIPEvent == aLogInfo.EventType() ) + if ( aLogInfo.EventType() != CPELogInfo::EPEVoIPEvent || + ( KNullDesC() == aEvent.Number() && + KErrNotFound == iEvent->Data().Find( KLogsDataFldTag_URL ) ) ) { - TRAPD( error, RemoveTagFromDataFieldL( KLogsDataFldTag_URL ) ); - if( error ) - { - TEFLOGSTRING2( KTAERROR, - "LOG CPELogEvent::SetRemoteContact()>RemoveTagFromDataFieldL(), error=%d", error ) - } + aEvent.SetNumber( aLogInfo.PhoneNumber() ); } } - if ( KNullDesC() != aLogInfo.VoipAddress() ) + else if ( KNullDesC() != aLogInfo.VoipAddress() && + KNullDesC() == aEvent.Number()) { TRAPD( error, SetDataFieldL( KLogsDataFldTag_URL, aLogInfo.VoipAddress() ) ); if ( error ) @@ -693,38 +694,6 @@ TEFLOGSTRING2( KTAERROR, "LOG CPELogEvent::SetRemoteContact()>SetDataFieldL(), error=%d", error ) } - aEvent.SetNumber( KNullDesC() ); - } - } - -// ----------------------------------------------------------------------------- -// CPELogEvent::RemoveTagFromDataFieldL -// ----------------------------------------------------------------------------- -// -void CPELogEvent::RemoveTagFromDataFieldL( const TDesC8& aTag ) - { - __ASSERT_ALWAYS( aTag.Length() != 0 , - User::Leave( KErrArgument ) ); - - TInt index = iEvent->Data().Find( aTag ); - if ( KErrNotFound != index ) - { - HBufC8* eventData = iEvent->Data().AllocLC(); - TPtrC8 urlData = eventData->Mid( index ); - TInt otherTag = urlData.Find( KLogsDataFldNameDelimiter ); - - const TInt dlLen = KLogsDataFldNameDelimiter().Length(); - if ( KErrNotFound == otherTag ) - { - eventData->Des().Delete( index - dlLen, urlData.Length() + dlLen ); - } - else - { - eventData->Des().Delete( index - dlLen, otherTag ); - } - iEvent->SetDataL( *eventData ); - - CleanupStack::PopAndDestroy( eventData ); } } diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/group/dialer.mmp --- a/phoneuis/dialer/group/dialer.mmp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/group/dialer.mmp Tue May 18 16:04:19 2010 +0100 @@ -74,6 +74,8 @@ LIBRARY centralrepository.lib LIBRARY cenrepnotifhandler.lib LIBRARY serviceprovidersettings.lib +LIBRARY featmgr.lib +LIBRARY peninputclient.lib // Keypad resources. Header is generated only for the // default variant, all the variants use the same header. diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/group/dialerstub.mmp --- a/phoneuis/dialer/group/dialerstub.mmp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/group/dialerstub.mmp Tue May 18 16:04:19 2010 +0100 @@ -60,6 +60,7 @@ LIBRARY euser.lib eikcore.lib estor.lib etext.lib LIBRARY cone.lib ws32.lib bmpanim.lib LIBRARY eikcoctl.lib fbscli.lib bafl.lib +LIBRARY peninputclient.lib LIBRARY commonengine.lib diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/inc/cdialer.h --- a/phoneuis/dialer/inc/cdialer.h Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/inc/cdialer.h Tue May 18 16:04:19 2010 +0100 @@ -24,6 +24,8 @@ #include #include +#include +#include #include "mnumberentry.h" #include "mphoneqwertymodeobserver.h" @@ -123,7 +125,8 @@ public CCoeControl, public MNumberEntry, public MCoeControlObserver, - public MPhoneQwertyModeObserver + public MPhoneQwertyModeObserver, + public MPenUiActivationHandler { public: // Constructors and destructor @@ -413,6 +416,18 @@ */ void LayoutNumberEntry( const TRect& aParent, TInt aVariety ); + public: + + /** + * @see MPenUiActivationHandler + */ + void OnPeninputUiDeactivated(); + + /** + * @see MPenUiActivationHandler + */ + void OnPeninputUiActivated(); + private: // Data // Keypad container - owned @@ -459,7 +474,12 @@ * Is qwerty mode on. */ TBool iQwertyMode; - + + /** + * Server wich sends events via callback when the virtual keyboard is opened/closed. + */ + RPeninputServer iPeninputServer; + /** * Current type of the editor field. The field is numeric unless * the device is in QWERTY mode and there is some consumer (like VoIP, EasyDialing) diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/src/cdialer.cpp --- a/phoneuis/dialer/src/cdialer.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/src/cdialer.cpp Tue May 18 16:04:19 2010 +0100 @@ -35,6 +35,7 @@ #include #include #include +#include #include "cdialer.h" #include "dialercommon.h" @@ -81,6 +82,10 @@ EXPORT_C CDialer::~CDialer() { DIALER_PRINT("CDialer::~CDialer<"); + #ifdef RD_SCALABLE_UI_V2 + iPeninputServer.RemovePenUiActivationHandler( this ); + iPeninputServer.Close(); + #endif AknsUtils::DeregisterControlPosition( this ); delete iKeypadArea; @@ -134,6 +139,13 @@ SetComponentsToInheritVisibility( EFalse ); ActivateL(); + #ifdef RD_SCALABLE_UI_V2 + if ( AknLayoutUtils::PenEnabled() ) + { + User::LeaveIfError( iPeninputServer.Connect() ); + iPeninputServer.AddPenUiActivationHandler( this, EPluginInputModeAll ); + } + #endif DIALER_PRINT("CDialer::ConstructL>"); } @@ -825,24 +837,28 @@ void CDialer::LoadEasyDialingPlugin() { DIALER_PRINT( "CDialer::LoadEasyDialingPlugin" ) - TRAPD( error, + + if ( FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) ) { - iEasyDialer = CDialingExtensionInterface::NewL(); - iEasyDialer->InitializeL( *this ); - - iDialingExtensionObserver = CDialingExtensionObserver::NewL( iEasyDialer, iNumberEntry, this ); - iEasyDialer->AddObserverL( iDialingExtensionObserver ); - } ); - - if ( error ) - { - DIALER_PRINT( "CDialer::LoadEasyDialingPlugin, load failed" ) - - delete iEasyDialer; - iEasyDialer = NULL; - - delete iDialingExtensionObserver; - iDialingExtensionObserver = NULL; + TRAPD( error, + { + iEasyDialer = CDialingExtensionInterface::NewL(); + iEasyDialer->InitializeL( *this ); + + iDialingExtensionObserver = CDialingExtensionObserver::NewL( iEasyDialer, iNumberEntry, this ); + iEasyDialer->AddObserverL( iDialingExtensionObserver ); + } ); + + if ( error ) + { + DIALER_PRINT( "CDialer::LoadEasyDialingPlugin, load failed" ) + + delete iEasyDialer; + iEasyDialer = NULL; + + delete iDialingExtensionObserver; + iDialingExtensionObserver = NULL; + } } } @@ -890,4 +906,26 @@ iNumberEntry->SetRect( neRect ); } +// --------------------------------------------------------------------------- +// CDialer::OnPeninputUiDeactivated +// +// Gets called when the virtual keyboard editor is closed. +// --------------------------------------------------------------------------- +// +void CDialer::OnPeninputUiDeactivated() + { + DIALER_PRINT( "CDialer::OnPeninputUiDeactivated" ) + FocusChanged( EDrawNow ); + } + +// --------------------------------------------------------------------------- +// CDialer::OnPeninputUiActivated +// +// Gets called when the virtual keyboard editor is opened. +// --------------------------------------------------------------------------- +// +void CDialer::OnPeninputUiActivated() + { + DIALER_PRINT( "CDialer::OnPeninputUiActivated" ) + } // End of File diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/src/cdialerkeypadcontainer.cpp --- a/phoneuis/dialer/src/cdialerkeypadcontainer.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/src/cdialerkeypadcontainer.cpp Tue May 18 16:04:19 2010 +0100 @@ -295,9 +295,10 @@ // Calculate corresponding index in iButtons array TInt idx = col + row * colCount; - // Set mode and variety so that correct button internal layout will be used + // Set mode and variety so that correct button internal layout will be used. + // Always use ED mode, so that text labels are visible even when ED is off. iButtons[idx]->SetVariety( iVariety ); - iButtons[idx]->SetOperationMode( iOperatingMode ); + iButtons[idx]->SetOperationMode( EModeEasyDialing ); // Layout button TRect buttonRect = firstButtonRect; diff -r a2e87f73f7d7 -r 367ca2321732 phoneuis/dialer/src/cdialerstub.cpp --- a/phoneuis/dialer/src/cdialerstub.cpp Wed Apr 28 13:15:47 2010 +0100 +++ b/phoneuis/dialer/src/cdialerstub.cpp Tue May 18 16:04:19 2010 +0100 @@ -463,4 +463,25 @@ // Empty } +// --------------------------------------------------------------------------- +// CDialer::OnPeninputUiDeactivated +// +// Gets called when the virtual keyboard editor is closed. +// --------------------------------------------------------------------------- +// +void CDialer::OnPeninputUiDeactivated() + { + // Empty + } + +// --------------------------------------------------------------------------- +// CDialer::OnPeninputUiActivated +// +// Gets called when the virtual keyboard editor is opened. +// --------------------------------------------------------------------------- +// +void CDialer::OnPeninputUiActivated() + { + // Empty + } // End of File