phoneapp/phoneuicontrol/src/cphonestate.cpp
branchRCL_3
changeset 3 8871b09be73b
parent 0 5f000ab63145
child 4 24062c24fe38
equal deleted inserted replaced
2:c84cf270c54f 3:8871b09be73b
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    34 #include <aknsoundsystem.h>
    34 #include <aknsoundsystem.h>
    35 #include <cphcntprofileengine.h>
    35 #include <cphcntprofileengine.h>
    36 #include <wlaninternalpskeys.h>
    36 #include <wlaninternalpskeys.h>
    37 #include <btengdomainpskeys.h>
    37 #include <btengdomainpskeys.h>
    38 #include <btengdomaincrkeys.h>
    38 #include <btengdomaincrkeys.h>
    39 #include <SettingsInternalCRKeys.h>
    39 #include <settingsinternalcrkeys.h>
    40 #include <starterclient.h>
    40 #include <starterclient.h>
    41 #include <RSSSettings.h>
    41 #include <RSSSettings.h>
    42 #include <UikonInternalPSKeys.h>
    42 #include <UikonInternalPSKeys.h>
    43 #include <telephonydomainpstypes.h>
    43 #include <telephonydomainpstypes.h>
    44 #include <telinformationpskeys.h>
    44 #include <telinformationpskeys.h>
   103 #include "cphonereleasecommand.h"
   103 #include "cphonereleasecommand.h"
   104 #include "cphonecontinueemergencycallcommand.h"
   104 #include "cphonecontinueemergencycallcommand.h"
   105 #include "cphonecallheadermanager.h"
   105 #include "cphonecallheadermanager.h"
   106 #include "cphonenumberentrymanager.h"
   106 #include "cphonenumberentrymanager.h"
   107 #include "mphonestorage.h"
   107 #include "mphonestorage.h"
       
   108 #include "easydialingcommands.hrh"
       
   109 
   108 
   110 
   109 // ================= MEMBER FUNCTIONS =======================
   111 // ================= MEMBER FUNCTIONS =======================
   110 
   112 
   111 EXPORT_C CPhoneState::CPhoneState(
   113 EXPORT_C CPhoneState::CPhoneState(
   112     MPhoneStateMachine* aStateMachine,
   114     MPhoneStateMachine* aStateMachine,
   457          !btAvailable )
   459          !btAvailable )
   458         {
   460         {
   459         CPhoneBtaaDisconnectHandler::InstanceL()->HandleConnectionLostL();
   461         CPhoneBtaaDisconnectHandler::InstanceL()->HandleConnectionLostL();
   460         }
   462         }
   461     else if ( audioOutput == EPEBTAudioAccessory && 
   463     else if ( audioOutput == EPEBTAudioAccessory && 
   462             previousOutput != EPEBTAudioAccessory &&
   464     		previousOutput > EPENotActive && 
       
   465     		previousOutput != EPEBTAudioAccessory &&
   463             btAvailable )
   466             btAvailable )
   464         {
   467         {
   465         CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
   468         CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
   466             iViewCommandHandle, iStateMachine, this );
   469             iViewCommandHandle, iStateMachine, this );
   467         bt->ShowBTActivatedL();
   470         bt->ShowBTActivatedL();
  1057 
  1060 
  1058     TBool numberEntryUsed = IsNumberEntryUsedL();
  1061     TBool numberEntryUsed = IsNumberEntryUsedL();
  1059 
  1062 
  1060     if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 ||
  1063     if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 ||
  1061               aKeyEvent.iScanCode == EStdKeyBackspace ||
  1064               aKeyEvent.iScanCode == EStdKeyBackspace ||
  1062               aKeyEvent.iScanCode ==EStdKeyLeftArrow  ||
  1065               aKeyEvent.iScanCode ==EStdKeyLeftArrow  ||              
       
  1066               aKeyEvent.iScanCode == EStdKeyUpArrow  ||
       
  1067               aKeyEvent.iScanCode == EStdKeyDownArrow  ||              
  1063               aKeyEvent.iScanCode ==EStdKeyRightArrow ))
  1068               aKeyEvent.iScanCode ==EStdKeyRightArrow ))
  1064         {
  1069         {
  1065         // Number entry exists but may be hidden
  1070         // Number entry exists but may be hidden
  1066         KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode );
  1071         KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode );
  1067         }
  1072         }
  1126     __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsNoteDismissableL: %d ", dismiss );
  1131     __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsNoteDismissableL: %d ", dismiss );
  1127     return dismiss;
  1132     return dismiss;
  1128     }
  1133     }
  1129 
  1134 
  1130 // -----------------------------------------------------------
  1135 // -----------------------------------------------------------
       
  1136 // CPhoneState::IsDialingExtensionInFocusL
       
  1137 // -----------------------------------------------------------
       
  1138 //
       
  1139 EXPORT_C TBool CPhoneState::IsDialingExtensionInFocusL() const
       
  1140     {
       
  1141     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsDialingExtensionInFocusL( ) ");
       
  1142     return iViewCommandHandle->HandleCommandL(
       
  1143         EPhoneViewGetEasyDialingInFocusStatus ) ==
       
  1144         EPhoneViewResponseSuccess;
       
  1145     }
       
  1146 
       
  1147 // -----------------------------------------------------------
  1131 // CPhoneState::SendKeyEventL
  1148 // CPhoneState::SendKeyEventL
  1132 // -----------------------------------------------------------
  1149 // -----------------------------------------------------------
  1133 //
  1150 //
  1134 void CPhoneState::SendKeyEventL(
  1151 void CPhoneState::SendKeyEventL(
  1135     const TKeyEvent& aKeyEvent,
  1152     const TKeyEvent& aKeyEvent,
  1435             }
  1452             }
  1436         }
  1453         }
  1437     else if ( aCategory == KPSUidStartup && aKey == KStartupSimSecurityStatus )
  1454     else if ( aCategory == KPSUidStartup && aKey == KStartupSimSecurityStatus )
  1438         {
  1455         {
  1439         // Show security note, SIM is not valid.
  1456         // Show security note, SIM is not valid.
  1440         if ( aValue == ESimRejected ||  aValue == ESimUnaccepted )
  1457         if ( aValue == ESimRejected 
       
  1458                 || aValue == ESimUnaccepted 
       
  1459                 || aValue == ESimInvalid )
  1441             {
  1460             {
  1442             __PHONELOG( EBasic, EPhoneControl, "CPhoneStateStartup::HandlePropertyChangedL - SimSecurity status received" );
  1461             __PHONELOG( EBasic, EPhoneControl, "CPhoneStateStartup::HandlePropertyChangedL - SimSecurity status received" );
  1443             StartShowSecurityNoteL();
  1462             StartShowSecurityNoteL();
  1444             }
  1463             }
  1445         }
  1464         }
  1506         case EPhoneEmergencyCmdExit:
  1525         case EPhoneEmergencyCmdExit:
  1507             {
  1526             {
  1508             //cancel emergency mode.
  1527             //cancel emergency mode.
  1509             TPhoneCmdParamBoolean booleanParam;
  1528             TPhoneCmdParamBoolean booleanParam;
  1510             booleanParam.SetBoolean( EFalse );
  1529             booleanParam.SetBoolean( EFalse );
  1511             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam );
  1530             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRestrictedDialer, &booleanParam );
  1512             }
  1531             }
  1513             // this should be bypasses?
  1532             // this should be bypasses?
  1514         case EPhoneDialerCallHandling:
  1533         case EPhoneDialerCallHandling:
  1515         case EPhoneCmdBack:
  1534         case EPhoneCmdBack:
  1516             BeginTransEffectLC( ENumberEntryClose );
  1535             BeginTransEffectLC( ENumberEntryClose );
  1643                 iCbaManager->SetCbaL( EPhoneEmergencyModeNoteCBA );
  1662                 iCbaManager->SetCbaL( EPhoneEmergencyModeNoteCBA );
  1644 
  1663 
  1645                 // Set dialer to restricted mode.
  1664                 // Set dialer to restricted mode.
  1646                 TPhoneCmdParamBoolean booleanParam;
  1665                 TPhoneCmdParamBoolean booleanParam;
  1647                 booleanParam.SetBoolean( ETrue );
  1666                 booleanParam.SetBoolean( ETrue );
  1648                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam );
  1667                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRestrictedDialer, &booleanParam );
  1649 
  1668 
  1650                 NumberEntryManagerL()->CreateNumberEntryL();
  1669                 NumberEntryManagerL()->CreateNumberEntryL();
  1651                 }
  1670                 }
  1652             }
  1671             }
  1653             break;
  1672             break;
  1732         case EPhoneCmdVideoCallOutOfMemory:
  1751         case EPhoneCmdVideoCallOutOfMemory:
  1733             ShowVideoCallOutOfMemoryNoteL();
  1752             ShowVideoCallOutOfMemoryNoteL();
  1734             DisconnectCallL();
  1753             DisconnectCallL();
  1735             break;
  1754             break;
  1736 
  1755 
       
  1756         case EPhoneCmdUpdateCba:
       
  1757         case EPhoneDialerValidNumber:
       
  1758         case EPhoneDialerInvalidNumber:
       
  1759         case EPhoneCmdBlockingDialogLaunched:
       
  1760         case EPhoneCmdBlockingDialogClosed:
       
  1761             {
       
  1762             // these command ids are sent by easydialing to communicate to phone app
       
  1763             HandleEasyDialingCommandsL( aCommand );
       
  1764             }
       
  1765             break;
       
  1766                 
  1737         default:
  1767         default:
  1738             if ( IsOnScreenDialerSupported() )
  1768             if ( IsOnScreenDialerSupported() )
  1739                 {
  1769                 {
  1740                 // Offer command to view.
  1770                 // Offer command to view.
       
  1771                 // Easydialing commands are handled in view, too.
  1741                 TPhoneViewResponseId resId =
  1772                 TPhoneViewResponseId resId =
  1742                             iViewCommandHandle->HandleCommandL( aCommand );
  1773                             iViewCommandHandle->HandleCommandL( aCommand );
  1743 
  1774 
  1744                 if( resId == EPhoneViewResponseFailed )
  1775                 if( resId == EPhoneViewResponseFailed )
  1745                     {
  1776                     {
  1746                     commandStatus = EFalse;
  1777                      commandStatus = EFalse;
  1747                     }
  1778                     }
  1748                 }
  1779                 }
  1749             else
  1780             else
  1750                 {
  1781                 {
  1751                 commandStatus = EFalse;
  1782                 commandStatus = EFalse;
  1956 
  1987 
  1957 // -----------------------------------------------------------
  1988 // -----------------------------------------------------------
  1958 // CPhoneState::DisconnectCallL
  1989 // CPhoneState::DisconnectCallL
  1959 // -----------------------------------------------------------
  1990 // -----------------------------------------------------------
  1960 //
  1991 //
  1961 EXPORT_C TBool CPhoneState::DisconnectCallL()
  1992 EXPORT_C void CPhoneState::DisconnectCallL()
  1962     {
  1993     {
  1963     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisconnectCallL( ) ");
  1994     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisconnectCallL( ) ");
  1964     // Fetch active call's id from view
  1995     // Fetch active call's id from view
  1965     TPhoneCmdParamCallStateData callStateData;
  1996     TPhoneCmdParamCallStateData callStateData;
  1966     callStateData.SetCallState( EPEStateConnected );
  1997     callStateData.SetCallState( EPEStateConnected );
  1997             iViewCommandHandle->HandleCommandL(
  2028             iViewCommandHandle->HandleCommandL(
  1998                 EPhoneViewGetCallIdByState, &callStateData );
  2029                 EPhoneViewGetCallIdByState, &callStateData );
  1999             }
  2030             }
  2000         }
  2031         }
  2001 
  2032 
  2002     TBool ret = EFalse;
       
  2003     if( callStateData.CallId() > KErrNotFound )
  2033     if( callStateData.CallId() > KErrNotFound )
  2004         {
  2034         {
  2005         // Release the call
  2035         // Release the call
  2006         iStateMachine->SetCallId( callStateData.CallId() );
  2036         iStateMachine->SetCallId( callStateData.CallId() );
  2007         if( IsVideoCall( callStateData.CallId() ) )
  2037         if( IsVideoCall( callStateData.CallId() ) )
  2020             {
  2050             {
  2021             // Release the call
  2051             // Release the call
  2022             iStateMachine->SendPhoneEngineMessage(
  2052             iStateMachine->SendPhoneEngineMessage(
  2023                 MPEPhoneModel::EPEMessageRelease );
  2053                 MPEPhoneModel::EPEMessageRelease );
  2024             }
  2054             }
  2025         ret = ETrue;
       
  2026         }
  2055         }
  2027     else
  2056     else
  2028         {
  2057         {
  2029         __PHONELOG( EOnlyFatal, EPhoneControl,
  2058         __PHONELOG( EOnlyFatal, EPhoneControl,
  2030             "CPhoneState::DisconnectCallL has negative call id!" );
  2059             "CPhoneState::DisconnectCallL has negative call id!" );
  2031         }
  2060         }   
  2032 
  2061    }
  2033     return ret;
       
  2034     }
       
  2035 
  2062 
  2036 // -----------------------------------------------------------
  2063 // -----------------------------------------------------------
  2037 // CPhoneState::DisplayIdleScreenL
  2064 // CPhoneState::DisplayIdleScreenL
  2038 // -----------------------------------------------------------
  2065 // -----------------------------------------------------------
  2039 //
  2066 //
  2120                 EPhoneDialerCmdLog );
  2147                 EPhoneDialerCmdLog );
  2121                 return;
  2148                 return;
  2122                 }
  2149                 }
  2123             }
  2150             }
  2124         }
  2151         }
  2125 
  2152     
  2126     // Get the number entry contents
  2153     // If easydialing has focus, call should be initiated to focused contact.
  2127     HBufC* phoneNumber = PhoneNumberFromEntryLC();
  2154     if ( IsDialingExtensionInFocusL() )
  2128 
  2155         {
  2129     // Call the number
  2156         iViewCommandHandle->HandleCommandL( EEasyDialingVoiceCall );
  2130     iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
  2157         }
  2131 
  2158     else
  2132     if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
  2159         {  
  2133         {
  2160         // Get the number entry contents
  2134         // Closing effect is shown when dialer exist.
  2161         HBufC* phoneNumber = PhoneNumberFromEntryLC();
  2135         BeginTransEffectLC( ENumberEntryClose );
  2162         
  2136         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  2163         // Call the number
  2137         EndTransEffect();
  2164         iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
  2138 
  2165     
  2139         HandleNumberEntryClearedL();
  2166         if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
  2140         }
  2167             {
  2141 
  2168             // Closing effect is shown when dialer exist.
  2142     CleanupStack::PopAndDestroy( phoneNumber );
  2169             BeginTransEffectLC( ENumberEntryClose );            
  2143 
  2170             iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  2144     if ( !iCustomization ||
  2171             EndTransEffect();
  2145          !iCustomization->HandleCallFromNumberEntryL() )
  2172             
  2146         {
  2173             HandleNumberEntryClearedL();
  2147         // Customization didn't handle call. Dial voice call
  2174             }
  2148         // as normally
  2175     
  2149         DialVoiceCallL();
  2176         CleanupStack::PopAndDestroy( phoneNumber );        
  2150         }
  2177     
  2151 
  2178         if ( !iCustomization || 
       
  2179              !iCustomization->HandleCallFromNumberEntryL() )
       
  2180             {
       
  2181             // Customization didn't handle call. Dial voice call
       
  2182             // as normally
       
  2183             DialVoiceCallL();
       
  2184             }
       
  2185         }
       
  2186     
  2152     }
  2187     }
  2153 
  2188 
  2154 // -----------------------------------------------------------
  2189 // -----------------------------------------------------------
  2155 // CPhoneState::DisplayHeaderForCallComingInL
  2190 // CPhoneState::DisplayHeaderForCallComingInL
  2156 // -----------------------------------------------------------
  2191 // -----------------------------------------------------------
  2730        CPhonePubSubProxy::Instance()->Value(
  2765        CPhonePubSubProxy::Instance()->Value(
  2731             KPSUidCtsyCallInformation,
  2766             KPSUidCtsyCallInformation,
  2732             KCTsyCallType ) );
  2767             KCTsyCallType ) );
  2733 
  2768 
  2734     TInt activeCallId = GetActiveCallIdL();
  2769     TInt activeCallId = GetActiveCallIdL();
  2735     if ( activeCallId > KErrNotFound )
  2770     if ( activeCallId > KErrNone )
  2736         {
  2771         {
  2737         if ( iStateMachine->PhoneEngineInfo()->CallALSLine( activeCallId )
  2772         if ( iStateMachine->PhoneEngineInfo()->CallALSLine( activeCallId )
  2738              == CCCECallParameters::ECCELineTypeAux )
  2773              == CCCECallParameters::ECCELineTypeAux )
  2739             {
  2774             {
  2740             incallIndicatorParam.SetLine2( ETrue );
  2775             incallIndicatorParam.SetLine2( ETrue );
  2777                 // display the little bubble. If we don't hide it here then
  2812                 // display the little bubble. If we don't hide it here then
  2778                 // it will appear for a short time. We don't want that.
  2813                 // it will appear for a short time. We don't want that.
  2779                 incallIndicatorParam.SetLittleBubbleVisible( EFalse );
  2814                 incallIndicatorParam.SetLittleBubbleVisible( EFalse );
  2780                 }
  2815                 }
  2781             }
  2816             }
       
  2817         }
       
  2818     // TODO: Refactor -> this looks really dubious.
       
  2819     else
       
  2820         {
       
  2821         incallIndicatorParam.SetLittleBubbleVisible( ETrue );
  2782         }
  2822         }
  2783 
  2823 
  2784     // Update the in-call indicator
  2824     // Update the in-call indicator
  2785     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateIncallIndicator,
  2825     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateIncallIndicator,
  2786         &incallIndicatorParam );
  2826         &incallIndicatorParam );
  3332         // Sim state is valid, check also Sim security status
  3372         // Sim state is valid, check also Sim security status
  3333         switch ( SimSecurityStatus() )
  3373         switch ( SimSecurityStatus() )
  3334             {
  3374             {
  3335             case ESimRejected:
  3375             case ESimRejected:
  3336             case ESimUnaccepted:
  3376             case ESimUnaccepted:
       
  3377             case ESimInvalid:
  3337                 retVal = EFalse;
  3378                 retVal = EFalse;
  3338                 break;
  3379                 break;
  3339 
  3380 
  3340             default:
  3381             default:
  3341                 break;
  3382                 break;
  3433     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
  3474     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
  3434         &uidParam );
  3475         &uidParam );
  3435 
  3476 
  3436     TInt resourceId ( KErrNone );
  3477     TInt resourceId ( KErrNone );
  3437 
  3478 
  3438     if ( SimSecurityStatus() == ESimRejected )
  3479 
  3439         {
  3480     switch( SimSecurityStatus() )
  3440         resourceId = CPhoneMainResourceResolver::Instance()->
  3481         {
  3441             ResolveResourceID( EPhoneSimRejected );
  3482 			  case ESimRejected:
  3442         }
  3483 			      {
  3443     else if ( SimState() == EPESimNotPresent )
  3484 			      resourceId = CPhoneMainResourceResolver::Instance()->
  3444         {
  3485               ResolveResourceID( EPhoneSimRejected );
  3445         // insert sim card -note
  3486             break;
  3446         resourceId = CPhoneMainResourceResolver::Instance()->
  3487 			      }
  3447             ResolveResourceID( EPhoneSimRemoved );
  3488 			  case ESimUnaccepted:
  3448         }
  3489 			      {
  3449     else if ( SimSecurityStatus() == ESimUnaccepted )
  3490 			      // insert sim card -note
  3450         {
  3491             resourceId = CPhoneMainResourceResolver::Instance()->
  3451         resourceId = CPhoneMainResourceResolver::Instance()->
  3492               ResolveResourceID( EPhoneSimUnaccepted );	
  3452             ResolveResourceID( EPhoneSimUnaccepted );
  3493 			      break;
       
  3494 			      }
       
  3495 			  case ESimInvalid:
       
  3496 			      {
       
  3497 			      resourceId = CPhoneMainResourceResolver::Instance()->
       
  3498               ResolveResourceID( EPhoneSIMInvalidUICC );
       
  3499 			      break;
       
  3500 			      }
       
  3501         default:
       
  3502 	          {
       
  3503 	          if ( SimState() == EPESimNotPresent )
       
  3504                 {
       
  3505                 // insert sim card -note
       
  3506                 resourceId = CPhoneMainResourceResolver::Instance()->
       
  3507                     ResolveResourceID( EPhoneSimRemoved );
       
  3508                 }
       
  3509 	          break;	
       
  3510 	          }
  3453         }
  3511         }
  3454 
  3512 
  3455     if ( resourceId != KErrNone )
  3513     if ( resourceId != KErrNone )
  3456         {
  3514         {
  3457         // Add it to the resource string
  3515         // Add it to the resource string
  3819     TPhoneCmdParamInteger numberEntryCountParam;
  3877     TPhoneCmdParamInteger numberEntryCountParam;
  3820     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
  3878     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
  3821             &numberEntryCountParam );
  3879             &numberEntryCountParam );
  3822     TInt neLength( numberEntryCountParam.Integer() );
  3880     TInt neLength( numberEntryCountParam.Integer() );
  3823 
  3881 
  3824     if( iCustomization && iCustomization->AllowAlphaNumericMode() )
  3882     if( neLength == 1 )
  3825         {
  3883         {
  3826         if ( NumberEntryManagerL()->NumberEntryInNumericModeL() )
  3884         TPhoneCmdParamBoolean isSecurityMode;
  3827             {
  3885         iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
  3828             if ( neLength == 0 )
  3886 
  3829                 {
  3887         if ( !isSecurityMode.Boolean() )
  3830                 OnlyHashInNumberEntryL();
  3888             {
  3831                 }
  3889             OnlyHashInNumberEntryL();
  3832 
       
  3833             if ( neLength == 1 )
       
  3834                 {
       
  3835                 NumberEntryClearL();
       
  3836                 }
       
  3837             }
       
  3838         NumberEntryManagerL()->NumberEntryToggleAlphaNumericModeL();
       
  3839         }
       
  3840     else
       
  3841         {
       
  3842         if( neLength == 1 )
       
  3843             {
       
  3844             TPhoneCmdParamBoolean isSecurityMode;
       
  3845             iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
       
  3846 
       
  3847             if ( !isSecurityMode.Boolean() )
       
  3848                 {
       
  3849                 OnlyHashInNumberEntryL();
       
  3850                 }
       
  3851             }
  3890             }
  3852         }
  3891         }
  3853     }
  3892     }
  3854 
  3893 
  3855 // -----------------------------------------------------------
  3894 // -----------------------------------------------------------
  4130     Sim security statuses:
  4169     Sim security statuses:
  4131 
  4170 
  4132     ESimSecurityStatusUninitialized = KStartupEnumerationFirstValue,
  4171     ESimSecurityStatusUninitialized = KStartupEnumerationFirstValue,
  4133     ESimRejected,   // The PUK code has been entered incorrectly, so the card is rejected.
  4172     ESimRejected,   // The PUK code has been entered incorrectly, so the card is rejected.
  4134     ESimUnaccepted  // The SIM lock is on, so the card is unaccepted.
  4173     ESimUnaccepted  // The SIM lock is on, so the card is unaccepted.
       
  4174     ESimInvalid     // The Sim inserted is not same as the one provided by the
       
  4175                     // operator, so card is invalid.
  4135     */
  4176     */
  4136     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimSecurityStatus()" );
  4177     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimSecurityStatus()" );
  4137     return CPhonePubSubProxy::Instance()->Value(
  4178     return CPhonePubSubProxy::Instance()->Value(
  4138                     KPSUidStartup, KStartupSimSecurityStatus );
  4179                     KPSUidStartup, KStartupSimSecurityStatus );
  4139     }
  4180     }
  4939         TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
  4980         TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
  4940             EPhoneViewEnableToolbarButton, &integerParam ));
  4981             EPhoneViewEnableToolbarButton, &integerParam ));
  4941         }
  4982         }
  4942     }
  4983     }
  4943 
  4984 
       
  4985 // ---------------------------------------------------------
       
  4986 // CPhoneState::HandleEasyDialingCommandsL
       
  4987 // ---------------------------------------------------------
       
  4988 //
       
  4989 void CPhoneState::HandleEasyDialingCommandsL( TInt aCommandId )
       
  4990     {
       
  4991     switch ( aCommandId )
       
  4992         {
       
  4993         case EPhoneCmdUpdateCba:
       
  4994             iCbaManager->UpdateInCallCbaL();
       
  4995             break;
       
  4996                 
       
  4997         case EPhoneDialerValidNumber:
       
  4998             {
       
  4999             TPhoneCmdParamBoolean command;
       
  5000             command.SetBoolean( EFalse );
       
  5001             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );           
       
  5002             }
       
  5003             break;
       
  5004                 
       
  5005         case EPhoneDialerInvalidNumber:
       
  5006             {
       
  5007             TPhoneCmdParamBoolean command;
       
  5008             command.SetBoolean( ETrue );
       
  5009             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );
       
  5010             }
       
  5011             break;
       
  5012             
       
  5013         case EPhoneCmdBlockingDialogLaunched:
       
  5014             {
       
  5015             TPhoneCmdParamBoolean param;
       
  5016             param.SetBoolean( ETrue );
       
  5017             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
       
  5018             }
       
  5019             break;
       
  5020             
       
  5021         case EPhoneCmdBlockingDialogClosed:
       
  5022             {
       
  5023             TPhoneCmdParamBoolean param;
       
  5024             param.SetBoolean( EFalse );
       
  5025             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
       
  5026             }
       
  5027             break;
       
  5028             
       
  5029         default:
       
  5030             break;
       
  5031         }
       
  5032     }
  4944 
  5033 
  4945 //  End of File
  5034 //  End of File
  4946 
  5035