1066 |
1066 |
1067 TBool numberEntryUsed = IsNumberEntryUsedL(); |
1067 TBool numberEntryUsed = IsNumberEntryUsedL(); |
1068 |
1068 |
1069 if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 || |
1069 if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 || |
1070 aKeyEvent.iScanCode == EStdKeyBackspace || |
1070 aKeyEvent.iScanCode == EStdKeyBackspace || |
1071 aKeyEvent.iScanCode ==EStdKeyLeftArrow || |
1071 aKeyEvent.iScanCode == EStdKeyLeftArrow || |
1072 aKeyEvent.iScanCode == EStdKeyUpArrow || |
1072 aKeyEvent.iScanCode == EStdKeyUpArrow || |
1073 aKeyEvent.iScanCode == EStdKeyDownArrow || |
1073 aKeyEvent.iScanCode == EStdKeyDownArrow || |
1074 aKeyEvent.iScanCode ==EStdKeyRightArrow )) |
1074 aKeyEvent.iScanCode == EStdKeyRightArrow )) |
1075 { |
1075 { |
1076 // Number entry exists but may be hidden |
1076 // Number entry exists but may be hidden |
1077 KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode ); |
1077 KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode ); |
1078 } |
1078 } |
1079 |
1079 |
1527 { |
1527 { |
1528 case EPhoneEmergencyCmdExit: |
1528 case EPhoneEmergencyCmdExit: |
1529 // this should be bypasses? |
1529 // this should be bypasses? |
1530 case EPhoneDialerCallHandling: |
1530 case EPhoneDialerCallHandling: |
1531 case EPhoneCmdBack: |
1531 case EPhoneCmdBack: |
1532 BeginTransEffectLC( ENumberEntryClose ); |
|
1533 // Remove number entry from screen |
1532 // Remove number entry from screen |
1534 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
1533 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
1535 // Do state-specific behaviour if number entry is cleared |
1534 // Do state-specific behaviour if number entry is cleared |
1536 HandleNumberEntryClearedL(); |
1535 HandleNumberEntryClearedL(); |
1537 EndTransEffect(); |
|
1538 break; |
1536 break; |
1539 |
1537 |
1540 case EPhoneDialerCmdTouchInput: |
1538 case EPhoneDialerCmdTouchInput: |
1541 OpenVkbL(); |
1539 OpenVkbL(); |
1542 break; |
1540 break; |
1633 CPhoneState::SetBTHandsfreeModeL( |
1631 CPhoneState::SetBTHandsfreeModeL( |
1634 aCommand == EPhoneInCallCmdBtHandsfree ); |
1632 aCommand == EPhoneInCallCmdBtHandsfree ); |
1635 break; |
1633 break; |
1636 |
1634 |
1637 case EPhoneInCallCmdActivatEPhonebook: |
1635 case EPhoneInCallCmdActivatEPhonebook: |
1638 { |
|
1639 // Launch Phonebook application |
|
1640 TPhoneCmdParamAppInfo appInfoParam; |
|
1641 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
|
1642 iViewCommandHandle->ExecuteCommandL( |
|
1643 EPhoneViewActivateApp, &appInfoParam ); |
|
1644 } |
|
1645 break; |
|
1646 |
|
1647 case EPhoneDialerCmdContacts: |
|
1648 { |
1636 { |
1649 // Launch Phonebook application |
1637 // Launch Phonebook application |
1650 TPhoneCmdParamAppInfo appInfoParam; |
1638 TPhoneCmdParamAppInfo appInfoParam; |
1651 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
1639 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
1652 iViewCommandHandle->ExecuteCommandL( |
1640 iViewCommandHandle->ExecuteCommandL( |
2071 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
2059 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
2072 |
2060 |
2073 // Set Idle app as the top app |
2061 // Set Idle app as the top app |
2074 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication ); |
2062 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication ); |
2075 |
2063 |
|
2064 // Go to Homescreen when application, which was open when answered incoming call, |
|
2065 // is closed during active call |
|
2066 if( TopAppIsDisplayedL() ) |
|
2067 { |
|
2068 DisplayIdleScreenL(); |
|
2069 } |
|
2070 |
2076 // Set Empty CBA |
2071 // Set Empty CBA |
2077 iCbaManager->SetCbaL( EPhoneEmptyCBA ); |
2072 iCbaManager->SetCbaL( EPhoneEmptyCBA ); |
2078 } |
2073 } |
2079 |
2074 |
2080 // --------------------------------------------------------- |
2075 // --------------------------------------------------------- |
2135 |
2130 |
2136 // Call the number |
2131 // Call the number |
2137 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
2132 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
2138 |
2133 |
2139 if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength ) |
2134 if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength ) |
2140 { |
2135 { |
2141 // Closing effect is shown when dialer exist. |
|
2142 BeginTransEffectLC( ENumberEntryClose ); |
|
2143 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
2136 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
2144 EndTransEffect(); |
|
2145 |
|
2146 HandleNumberEntryClearedL(); |
2137 HandleNumberEntryClearedL(); |
2147 } |
2138 } |
2148 |
2139 |
2149 CleanupStack::PopAndDestroy( phoneNumber ); |
2140 CleanupStack::PopAndDestroy( phoneNumber ); |
2150 |
2141 |
3876 // ----------------------------------------------------------- |
3867 // ----------------------------------------------------------- |
3877 // |
3868 // |
3878 EXPORT_C void CPhoneState::BeginTransEffectLC( TStateTransEffectType aType ) |
3869 EXPORT_C void CPhoneState::BeginTransEffectLC( TStateTransEffectType aType ) |
3879 { |
3870 { |
3880 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::BeginTransEffectLC( ) "); |
3871 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::BeginTransEffectLC( ) "); |
3881 TPhoneCmdParamTransEffect effectParam; |
3872 |
3882 |
3873 // Check if this particular effect can be used in the current state. |
3883 switch ( aType ) |
3874 if ( CanTransEffectTypeBeUsed( aType ) ) |
3884 { |
3875 { |
3885 case ENumberEntryOpen: |
3876 TPhoneCmdParamTransEffect effectParam; |
3886 effectParam.SetType( EPhoneTransEffectDialerOpen ); |
3877 switch ( aType ) |
3887 break; |
3878 { |
3888 case ENumberEntryClose: |
3879 case ENumberEntryOpen: |
3889 effectParam.SetType( EPhoneTransEffectDialerClose ); |
3880 effectParam.SetType( EPhoneTransEffectDialerOpen ); |
3890 break; |
3881 break; |
3891 case ENumberEntryCreate: |
3882 case ENumberEntryClose: |
3892 effectParam.SetType( EPhoneTransEffectDialerCreate ); |
3883 effectParam.SetType( EPhoneTransEffectDialerClose ); |
3893 break; |
3884 break; |
3894 default: |
3885 case ENumberEntryCreate: |
3895 effectParam.SetType( EPhoneTransEffectNone ); |
3886 effectParam.SetType( EPhoneTransEffectDialerCreate ); |
3896 } |
3887 break; |
3897 |
3888 default: |
3898 iViewCommandHandle->ExecuteCommand( EPhoneViewBeginTransEffect, &effectParam ); |
3889 effectParam.SetType( EPhoneTransEffectNone ); |
3899 |
3890 } |
|
3891 |
|
3892 iViewCommandHandle->ExecuteCommand( EPhoneViewBeginTransEffect, |
|
3893 &effectParam ); |
|
3894 } |
|
3895 |
|
3896 // Always put the cleanup item into stack as expected by the caller. |
3900 TCleanupItem operation( EffectCleanup, this ); |
3897 TCleanupItem operation( EffectCleanup, this ); |
3901 CleanupStack::PushL( operation ); |
3898 CleanupStack::PushL( operation ); |
3902 } |
3899 } |
3903 |
3900 |
3904 // ----------------------------------------------------------- |
3901 // ----------------------------------------------------------- |
3972 // |
3969 // |
3973 void CPhoneState::EffectCleanup(TAny* aThis ) |
3970 void CPhoneState::EffectCleanup(TAny* aThis ) |
3974 { |
3971 { |
3975 TPhoneCmdParamTransEffect effectParam; |
3972 TPhoneCmdParamTransEffect effectParam; |
3976 effectParam.SetType( EPhoneTransEffectStop ); |
3973 effectParam.SetType( EPhoneTransEffectStop ); |
3977 |
3974 // won't do anything if effect wasn't started |
3978 static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
3975 static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
3979 EPhoneViewEndTransEffect, &effectParam ); |
3976 EPhoneViewEndTransEffect, &effectParam ); |
3980 } |
3977 } |
3981 |
3978 |
3982 // ----------------------------------------------------------------------------- |
3979 // ----------------------------------------------------------------------------- |
4004 booleanParam.SetBoolean( EFalse ); |
4001 booleanParam.SetBoolean( EFalse ); |
4005 // Disable dialer DTMF mode |
4002 // Disable dialer DTMF mode |
4006 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
4003 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
4007 &booleanParam ); |
4004 &booleanParam ); |
4008 |
4005 |
4009 // Closing effect is shown when DTMF dialer exist. |
|
4010 BeginTransEffectLC( ENumberEntryClose ); |
|
4011 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
4006 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
4012 EndTransEffect(); |
|
4013 } |
4007 } |
4014 else // Non-Touch |
4008 else // Non-Touch |
4015 { |
4009 { |
4016 // If dtmf query is visible then remove number entry |
4010 // If dtmf query is visible then remove number entry |
4017 // because it should not be shown if user has pressed end key. |
4011 // because it should not be shown if user has pressed end key. |
4343 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseCustomizedDialerL( ) "); |
4337 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseCustomizedDialerL( ) "); |
4344 |
4338 |
4345 // Set dialer back to default mode. |
4339 // Set dialer back to default mode. |
4346 iViewCommandHandle->HandleCommandL( EPhoneViewHideCustomizedDialer ); |
4340 iViewCommandHandle->HandleCommandL( EPhoneViewHideCustomizedDialer ); |
4347 |
4341 |
4348 // Closing effect is shown when customized dialer exist. |
|
4349 BeginTransEffectLC( ENumberEntryClose ); |
|
4350 |
|
4351 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
4342 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
4352 |
4343 |
4353 EndTransEffect(); |
|
4354 // Do state-specific behaviour if number entry is cleared |
4344 // Do state-specific behaviour if number entry is cleared |
4355 HandleNumberEntryClearedL(); |
4345 HandleNumberEntryClearedL(); |
4356 } |
4346 } |
4357 |
4347 |
4358 // ----------------------------------------------------------------------------- |
4348 // ----------------------------------------------------------------------------- |
4400 TPhoneCmdParamBoolean booleanParam; |
4390 TPhoneCmdParamBoolean booleanParam; |
4401 booleanParam.SetBoolean( ETrue ); |
4391 booleanParam.SetBoolean( ETrue ); |
4402 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
4392 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
4403 &booleanParam ); |
4393 &booleanParam ); |
4404 |
4394 |
4405 BeginTransEffectLC( ENumberEntryCreate ); |
|
4406 |
|
4407 if ( IsNumberEntryUsedL() ) |
4395 if ( IsNumberEntryUsedL() ) |
4408 { |
4396 { |
4409 // Store the number entry content to cache |
4397 // Store the number entry content to cache |
4410 if ( !IsNumberEntryContentStored() ) |
4398 if ( !IsNumberEntryContentStored() ) |
4411 { |
4399 { |
4666 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::OnlyHashInNumberEntryL( ) "); |
4652 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::OnlyHashInNumberEntryL( ) "); |
4667 // 0.8 seconds has passed, start ALS line change timer |
4653 // 0.8 seconds has passed, start ALS line change timer |
4668 StartAlsLineChangeTimerL(); |
4654 StartAlsLineChangeTimerL(); |
4669 } |
4655 } |
4670 |
4656 |
|
4657 // --------------------------------------------------------- |
|
4658 // CPhoneState::CanTransEffectTypeBeUsed |
|
4659 // --------------------------------------------------------- |
|
4660 // |
|
4661 EXPORT_C TBool CPhoneState::CanTransEffectTypeBeUsed( TStateTransEffectType /*aType*/ ) |
|
4662 { |
|
4663 // State dependant so return EFalse by default. |
|
4664 return EFalse; |
|
4665 } |
|
4666 |
4671 // ----------------------------------------------------------- |
4667 // ----------------------------------------------------------- |
4672 // CPhoneState::NumberEntryClearL |
4668 // CPhoneState::NumberEntryClearL |
4673 // ----------------------------------------------------------- |
4669 // ----------------------------------------------------------- |
4674 // |
4670 // |
4675 void CPhoneState::NumberEntryClearL() |
4671 void CPhoneState::NumberEntryClearL() |