630 void CPhoneState::SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
607 void CPhoneState::SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
631 TEventCode aEventCode ) |
608 TEventCode aEventCode ) |
632 { |
609 { |
633 |
610 |
634 if ( !IsTouchDTmfDialerOn() |
611 if ( !IsTouchDTmfDialerOn() |
635 && !IsAnyQueryActiveL() |
612 && !IsAnyQueryActiveL() ) |
636 && !IsMenuBarVisibleL() ) |
|
637 { |
613 { |
638 // Send the key event to the phone engine. |
614 // Send the key event to the phone engine. |
639 SendKeyEventL( aKeyEvent, aEventCode ); |
615 SendKeyEventL( aKeyEvent, aEventCode ); |
640 } |
616 } |
641 } |
617 } |
642 |
618 |
643 // ----------------------------------------------------------------------------- |
619 // ----------------------------------------------------------------------------- |
644 // CPhoneState::IsKeyEventFurtherProcessed |
620 // CPhoneState::IsKeyEventFurtherProcessed |
645 // ----------------------------------------------------------------------------- |
621 // ----------------------------------------------------------------------------- |
646 // |
622 // |
647 TBool CPhoneState::IsKeyEventFurtherProcessedL( const TKeyEvent& aKeyEvent ) const |
623 TBool CPhoneState::IsKeyEventFurtherProcessedL( const TKeyEvent& /*aKeyEvent*/ ) const |
648 { |
624 { |
649 // While being in some special keyboard mode (Full Screen&mini QWERTY, |
|
650 // handwriting mode) FEP sends only EEventKey -event and thus manual |
|
651 // DTMFs can not be played with the user specified tone lengths. Also, |
|
652 // in general, DTMFs are tried to play only in numeric mode. |
|
653 TBool numericMode = iViewCommandHandle->HandleCommandL( |
|
654 EPhoneViewIsNumberEntryNumericMode ) == EPhoneViewResponseSuccess; |
|
655 |
|
656 if ( ( aKeyEvent.iModifiers & EModifierSpecial ) != 0 || !numericMode ) |
|
657 { |
|
658 return EFalse; |
|
659 } |
|
660 |
|
661 return ETrue; |
625 return ETrue; |
662 } |
626 } |
663 |
627 |
664 // ----------------------------------------------------------- |
628 // ----------------------------------------------------------- |
665 // CPhoneState::HandleErrorL |
629 // CPhoneState::HandleErrorL |
989 } |
938 } |
990 } |
939 } |
991 } |
940 } |
992 |
941 |
993 // ----------------------------------------------------------- |
942 // ----------------------------------------------------------- |
994 // CPhoneState::IsNoteVisibleL |
|
995 // ----------------------------------------------------------- |
|
996 // |
|
997 EXPORT_C TBool CPhoneState::IsNoteVisibleL() |
|
998 { |
|
999 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsNoteVisibleL( ) "); |
|
1000 TPhoneCmdParamBoolean booleanParam; |
|
1001 iViewCommandHandle->ExecuteCommandL( |
|
1002 EPhoneViewGetIsNoteVisible, &booleanParam ); |
|
1003 return booleanParam.Boolean(); |
|
1004 } |
|
1005 |
|
1006 // ----------------------------------------------------------- |
|
1007 // CPhoneState::IsMenuBarVisibleL |
|
1008 // ----------------------------------------------------------- |
|
1009 // |
|
1010 EXPORT_C TBool CPhoneState::IsMenuBarVisibleL() const |
|
1011 { |
|
1012 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsMenuBarVisibleL( ) "); |
|
1013 return iViewCommandHandle->HandleCommandL( |
|
1014 EPhoneViewIsMenuBarVisible ) == |
|
1015 EPhoneViewResponseSuccess; |
|
1016 } |
|
1017 |
|
1018 // ----------------------------------------------------------- |
|
1019 // CPhoneState::HandleNumericKeyEventL |
943 // CPhoneState::HandleNumericKeyEventL |
1020 // ----------------------------------------------------------- |
944 // ----------------------------------------------------------- |
1021 // |
945 // |
1022 EXPORT_C void CPhoneState::HandleNumericKeyEventL( |
946 EXPORT_C void CPhoneState::HandleNumericKeyEventL( |
1023 const TKeyEvent& aKeyEvent, |
947 const TKeyEvent& /*aKeyEvent*/, |
1024 TEventCode aEventCode ) |
948 TEventCode /*aEventCode*/ ) |
1025 { |
949 { |
1026 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleNumericKeyEventL( ) "); |
950 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleNumericKeyEventL( ) "); |
1027 |
|
1028 TBool numberEntryUsed = IsNumberEntryUsedL(); |
|
1029 |
|
1030 if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 || |
|
1031 aKeyEvent.iScanCode == EStdKeyBackspace || |
|
1032 aKeyEvent.iScanCode ==EStdKeyLeftArrow || |
|
1033 aKeyEvent.iScanCode ==EStdKeyRightArrow )) |
|
1034 { |
|
1035 // Number entry exists but may be hidden |
|
1036 KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode ); |
|
1037 } |
|
1038 |
951 |
1039 } |
952 } |
1040 |
953 |
1041 // ----------------------------------------------------------------------------- |
954 // ----------------------------------------------------------------------------- |
1042 // CPhoneState::IsAnyQueryActiveL |
955 // CPhoneState::IsAnyQueryActiveL |
1174 } |
1087 } |
1175 } |
1088 } |
1176 |
1089 |
1177 // <------------------------------ SYSTEM EVENTS -----------------------------> |
1090 // <------------------------------ SYSTEM EVENTS -----------------------------> |
1178 |
1091 |
1179 // ----------------------------------------------------------- |
|
1180 // CPhoneState::DynInitMenuPaneL |
|
1181 // ----------------------------------------------------------- |
|
1182 // |
|
1183 EXPORT_C void CPhoneState::DynInitMenuPaneL( |
|
1184 TInt aResourceId, |
|
1185 CEikMenuPane* aMenuPane ) |
|
1186 { |
|
1187 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DynInitMenuPaneL( ) "); |
|
1188 __ASSERT_DEBUG( aMenuPane && aResourceId, |
|
1189 Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1190 |
|
1191 // Save the number of digits in the number entry before processing |
|
1192 // the menu pane |
|
1193 if ( IsNumberEntryUsedL() ) |
|
1194 { |
|
1195 TPhoneCmdParamBoolean serviceCodeParam; |
|
1196 serviceCodeParam.SetBoolean( |
|
1197 iStateMachine->PhoneEngineInfo()->PhoneNumberIsServiceCode() ); |
|
1198 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetServiceCodeFlag, |
|
1199 &serviceCodeParam ); |
|
1200 } |
|
1201 |
|
1202 // Process the menu pane |
|
1203 TPhoneCmdParamDynMenu dynMenuPane; |
|
1204 dynMenuPane.SetResourceId( aResourceId ); |
|
1205 dynMenuPane.SetDynMenu( aMenuPane ); |
|
1206 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuPane, &dynMenuPane ); |
|
1207 |
|
1208 if ( iCustomization ) |
|
1209 { |
|
1210 // Menu pane is customized after default items are decided |
|
1211 iCustomization->CustomizeMenuPaneL(aResourceId, aMenuPane); |
|
1212 } |
|
1213 } |
|
1214 |
|
1215 // ----------------------------------------------------------- |
|
1216 // CPhoneState::DynInitMenuBarL |
|
1217 // ----------------------------------------------------------- |
|
1218 // |
|
1219 EXPORT_C void CPhoneState::DynInitMenuBarL( |
|
1220 TInt aResourceId, |
|
1221 CEikMenuBar* aMenuBar ) |
|
1222 { |
|
1223 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DynInitMenuBarL( ) "); |
|
1224 __ASSERT_DEBUG( aMenuBar && aResourceId, |
|
1225 Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1226 |
|
1227 TPhoneCmdParamDynMenu dynMenuBar; |
|
1228 dynMenuBar.SetResourceId( aResourceId ); |
|
1229 dynMenuBar.SetDynMenu( aMenuBar ); |
|
1230 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBar, &dynMenuBar ); |
|
1231 |
|
1232 if ( iCustomization ) |
|
1233 { |
|
1234 // Menu bar is customized after default items are decided |
|
1235 iCustomization->CustomizeMenuBarL(aResourceId, aMenuBar); |
|
1236 } |
|
1237 |
|
1238 } |
|
1239 |
1092 |
1240 // ----------------------------------------------------------- |
1093 // ----------------------------------------------------------- |
1241 // CPhoneState::HandleSystemEventL |
1094 // CPhoneState::HandleSystemEventL |
1242 // ----------------------------------------------------------- |
1095 // ----------------------------------------------------------- |
1243 // |
1096 // |
1412 return iViewCommandHandle->HandleCommandL( |
1245 return iViewCommandHandle->HandleCommandL( |
1413 EPhoneViewGetTopApplicationIsDisplayedStatus ) == |
1246 EPhoneViewGetTopApplicationIsDisplayedStatus ) == |
1414 EPhoneViewResponseSuccess; |
1247 EPhoneViewResponseSuccess; |
1415 } |
1248 } |
1416 |
1249 |
1417 // ----------------------------------------------------------- |
|
1418 // CPhoneState::TitlePaneIsVisibleL |
|
1419 // ----------------------------------------------------------- |
|
1420 // |
|
1421 TBool CPhoneState::TitlePaneIsVisibleL() const |
|
1422 { |
|
1423 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::TitlePaneIsVisibleL( ) "); |
|
1424 return iViewCommandHandle->HandleCommandL( |
|
1425 EPhoneViewGetTitlePaneIsVisibleStatus ) == |
|
1426 EPhoneViewResponseSuccess; |
|
1427 } |
|
1428 |
|
1429 // <---------------------------- MENU AND CBA EVENTS -------------------------> |
1250 // <---------------------------- MENU AND CBA EVENTS -------------------------> |
1430 |
1251 |
1431 EXPORT_C TBool CPhoneState::HandleCommandL( TInt aCommand ) |
1252 EXPORT_C TBool CPhoneState::HandleCommandL( TInt aCommand ) |
1432 { |
1253 { |
1433 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCommandL( ) "); |
1254 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCommandL( ) "); |
1434 TBool commandStatus = ETrue; |
1255 TBool commandStatus = ETrue; |
1435 switch( aCommand ) |
1256 switch( aCommand ) |
1436 { |
1257 { |
1437 case EPhoneEmergencyCmdExit: |
1258 case EPhoneEmergencyCmdExit: |
1438 { |
1259 { |
1439 //cancel emergency mode. |
|
1440 TPhoneCmdParamBoolean booleanParam; |
|
1441 booleanParam.SetBoolean( EFalse ); |
|
1442 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam ); |
|
1443 } |
1260 } |
1444 // this should be bypasses? |
1261 // this should be bypasses? |
1445 case EPhoneDialerCallHandling: |
1262 case EPhoneDialerCallHandling: |
1446 case EPhoneCmdBack: |
1263 case EPhoneCmdBack: |
1447 BeginTransEffectLC( ENumberEntryClose ); |
|
1448 // Remove number entry from screen |
1264 // Remove number entry from screen |
1449 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
1265 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
1450 // Do state-specific behaviour if number entry is cleared |
1266 // Do state-specific behaviour if number entry is cleared |
1451 HandleNumberEntryClearedL(); |
1267 HandleNumberEntryClearedL(); |
1452 EndTransEffect(); |
|
1453 break; |
1268 break; |
1454 |
1269 |
1455 case EPhoneDialerCmdTouchInput: |
1270 case EPhoneDialerCmdTouchInput: |
1456 OpenVkbL(); |
|
1457 break; |
1271 break; |
1458 |
1272 |
1459 case EPhoneNumberAcqCmdSendMessage: |
1273 case EPhoneNumberAcqCmdSendMessage: |
1460 // Open the mms editor |
|
1461 iViewCommandHandle->ExecuteCommandL( |
|
1462 EPhoneViewSendMessage ); |
|
1463 if ( !IsOnScreenDialerSupported() ) |
|
1464 { |
|
1465 // Remove number entry from screen |
|
1466 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
1467 // Do state-specific behaviour if number entry is cleared |
|
1468 HandleNumberEntryClearedL(); |
|
1469 } |
|
1470 break; |
1274 break; |
1471 |
1275 |
1472 case EPhoneNumberAcqCmdSave: |
1276 case EPhoneNumberAcqCmdSave: |
1473 // Open Create contact |
|
1474 iViewCommandHandle->ExecuteCommandL( |
|
1475 EPhoneViewAddContact ); |
|
1476 break; |
1277 break; |
1477 |
1278 |
1478 case EPhoneNumberAcqCmdAddToName: |
1279 case EPhoneNumberAcqCmdAddToName: |
1479 // Open the message editor |
|
1480 iViewCommandHandle->ExecuteCommandL( |
|
1481 EPhoneViewUpdateContact ); |
|
1482 break; |
1280 break; |
1483 |
1281 |
1484 case EPhoneNumberAcqCmdAddToContacts: |
1282 case EPhoneNumberAcqCmdAddToContacts: |
1485 { |
1283 { |
1486 if ( IsOnScreenDialerSupported() ) |
1284 if ( IsOnScreenDialerSupported() ) |
1549 aCommand == EPhoneInCallCmdBtHandsfree ); |
1347 aCommand == EPhoneInCallCmdBtHandsfree ); |
1550 break; |
1348 break; |
1551 |
1349 |
1552 case EPhoneInCallCmdActivatEPhonebook: |
1350 case EPhoneInCallCmdActivatEPhonebook: |
1553 { |
1351 { |
1554 // Launch Phonebook application |
|
1555 TPhoneCmdParamAppInfo appInfoParam; |
|
1556 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
|
1557 iViewCommandHandle->ExecuteCommandL( |
|
1558 EPhoneViewActivateApp, &appInfoParam ); |
|
1559 } |
1352 } |
1560 break; |
1353 break; |
1561 |
1354 |
1562 case EPhoneNumberAcqSecurityDialer: |
1355 case EPhoneNumberAcqSecurityDialer: |
1563 { |
1356 { |
1564 if ( IsOnScreenDialerSupported() && !IsNumberEntryUsedL() ) |
1357 |
1565 { |
|
1566 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
1567 TPhoneCmdParamBoolean visibleMode; |
|
1568 visibleMode.SetBoolean( ETrue ); |
|
1569 iViewCommandHandle->ExecuteCommandL( |
|
1570 EPhoneViewSetStatusPaneVisible, &visibleMode ); |
|
1571 |
|
1572 |
|
1573 // Set emergency CBA, empty - exit |
|
1574 iCbaManager->SetCbaL( EPhoneEmergencyModeNoteCBA ); |
|
1575 |
|
1576 // Set dialer to restricted mode. |
|
1577 TPhoneCmdParamBoolean booleanParam; |
|
1578 booleanParam.SetBoolean( ETrue ); |
|
1579 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam ); |
|
1580 |
|
1581 NumberEntryManagerL()->CreateNumberEntryL(); |
|
1582 } |
|
1583 } |
1358 } |
1584 break; |
1359 break; |
1585 |
1360 |
1586 case EPhoneDialerCmdContacts: |
1361 case EPhoneDialerCmdContacts: |
1587 { |
1362 { |
1588 // Launch Phonebook application |
1363 } |
1589 TPhoneCmdParamAppInfo appInfoParam; |
1364 break; |
1590 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
1365 |
1591 iViewCommandHandle->ExecuteCommandL( |
|
1592 EPhoneViewActivateApp, &appInfoParam ); |
|
1593 } |
|
1594 break; |
|
1595 |
|
1596 case EPhoneViewYesSingleItemFetch: |
|
1597 { |
|
1598 if ( IsOnScreenDialerSupported() ) |
|
1599 { |
|
1600 TBuf<KPhoneNumberEntryBufferSize> fetchContent; |
|
1601 fetchContent = iViewCommandHandle->FetchContent(); |
|
1602 if ( fetchContent.Length() ) |
|
1603 { |
|
1604 iViewCommandHandle->ExecuteCommandL( |
|
1605 EPhoneViewSetNumberEntryContent, |
|
1606 0, |
|
1607 fetchContent ); |
|
1608 |
|
1609 CallFromNumberEntryL(); |
|
1610 } |
|
1611 } |
|
1612 } |
|
1613 break; |
|
1614 case EPhoneNumberAcqCmdToggleNeAlphaMode: |
1366 case EPhoneNumberAcqCmdToggleNeAlphaMode: |
1615 case EPhoneNumberAcqCmdToggleNeNumericMode: |
1367 case EPhoneNumberAcqCmdToggleNeNumericMode: |
1616 { |
1368 { |
1617 // Toggle mode |
1369 |
1618 NumberEntryManagerL()->NumberEntryToggleAlphaNumericModeL(); |
|
1619 } |
1370 } |
1620 break; |
1371 break; |
1621 |
1372 |
1622 case EPhoneCmdYesVideoFailedNoMemorySwitchToVoice: |
1373 case EPhoneCmdYesVideoFailedNoMemorySwitchToVoice: |
1623 DialVoiceCallL(); |
1374 DialVoiceCallL(); |
2307 return EFalse; |
2017 return EFalse; |
2308 } |
2018 } |
2309 } |
2019 } |
2310 |
2020 |
2311 // <-------------------------- CONTEXT MENU -------------------------> |
2021 // <-------------------------- CONTEXT MENU -------------------------> |
2312 |
|
2313 // ----------------------------------------------------------------------------- |
|
2314 // CPhoneState::SetContextMenu |
|
2315 // ----------------------------------------------------------------------------- |
|
2316 // |
|
2317 EXPORT_C void CPhoneState::SetContextMenuL( TInt aResourceId ) |
|
2318 { |
|
2319 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetContextMenuL() "); |
|
2320 |
|
2321 TPhoneCmdParamInteger integerParam; |
|
2322 TInt resId( CPhoneMainResourceResolver::Instance()-> |
|
2323 ResolveResourceID( aResourceId ) ); |
|
2324 integerParam.SetInteger( resId ); |
|
2325 __PHONELOG1( EBasic, EPhoneControl, |
|
2326 "CPhoneState::SetContextMenuL : resId =%d",resId ); |
|
2327 |
|
2328 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateContextMenu, |
|
2329 &integerParam ); |
|
2330 } |
|
2331 // ----------------------------------------------------------------------------- |
|
2332 // CPhoneState::UpdateInCallContextMenuL |
|
2333 // ----------------------------------------------------------------------------- |
|
2334 // |
|
2335 EXPORT_C void CPhoneState::UpdateInCallContextMenuL() |
|
2336 { |
|
2337 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateInCallContextMenuL() "); |
|
2338 |
|
2339 SetContextMenuL( EPhoneNumberAcqMenubar ); |
|
2340 |
|
2341 } |
|
2342 |
|
2343 // ----------------------------------------------------------------------------- |
|
2344 // CPhoneState::UpdateIncomingContextMenuL |
|
2345 // ----------------------------------------------------------------------------- |
|
2346 // |
|
2347 EXPORT_C void CPhoneState::UpdateIncomingContextMenuL( TInt aCallId ) |
|
2348 { |
|
2349 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateIncomingContextMenuL() "); |
|
2350 |
|
2351 if( CPhoneState::IsVideoCall ( aCallId ) ) |
|
2352 { |
|
2353 SetContextMenuL( EPhoneIncomingVideoCallMenubar ); |
|
2354 } |
|
2355 else |
|
2356 { |
|
2357 SetContextMenuL( EPhoneIncomingCallMenubar ); |
|
2358 } |
|
2359 |
|
2360 } |
|
2361 |
2022 |
2362 // ----------------------------------------------------------- |
2023 // ----------------------------------------------------------- |
2363 // CPhoneState::ShowNoteL |
2024 // CPhoneState::ShowNoteL |
2364 // ----------------------------------------------------------- |
2025 // ----------------------------------------------------------- |
2365 // |
2026 // |
2599 } |
2265 } |
2600 |
2266 |
2601 // <-------------------------- INTERNAL FUNCTIONS ------------------------> |
2267 // <-------------------------- INTERNAL FUNCTIONS ------------------------> |
2602 |
2268 |
2603 // ----------------------------------------------------------- |
2269 // ----------------------------------------------------------- |
2604 // CPhoneState::UpdateIncallIndicatorL |
|
2605 // ----------------------------------------------------------- |
|
2606 // |
|
2607 void CPhoneState::UpdateIncallIndicatorL( TInt aCallState ) |
|
2608 { |
|
2609 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateIncallIndicatorL( ) "); |
|
2610 TPhoneCmdParamIncallIndicatorData incallIndicatorParam; |
|
2611 |
|
2612 // Set the state |
|
2613 incallIndicatorParam.SetCallState( aCallState ); |
|
2614 |
|
2615 // Set mode |
|
2616 incallIndicatorParam.SetMode( |
|
2617 CPhonePubSubProxy::Instance()->Value( |
|
2618 KPSUidCtsyCallInformation, |
|
2619 KCTsyCallType ) ); |
|
2620 |
|
2621 TInt activeCallId = GetActiveCallIdL(); |
|
2622 if ( activeCallId > KErrNotFound ) |
|
2623 { |
|
2624 if ( iStateMachine->PhoneEngineInfo()->CallALSLine( activeCallId ) |
|
2625 == CCCECallParameters::ECCELineTypeAux ) |
|
2626 { |
|
2627 incallIndicatorParam.SetLine2( ETrue ); |
|
2628 } |
|
2629 } |
|
2630 |
|
2631 // Set the mute status |
|
2632 const TBool audioMute = iStateMachine->PhoneEngineInfo()->AudioMute(); |
|
2633 incallIndicatorParam.SetMute( audioMute ); |
|
2634 |
|
2635 // Set the voice privacy status |
|
2636 if ( activeCallId > KErrNotFound && |
|
2637 activeCallId != KConferenceCallId ) |
|
2638 { |
|
2639 incallIndicatorParam.SetCiphering( |
|
2640 iStateMachine->PhoneEngineInfo()->IsSecureCall( activeCallId ) ); |
|
2641 } |
|
2642 else |
|
2643 { |
|
2644 incallIndicatorParam.SetCiphering( ETrue ); |
|
2645 } |
|
2646 |
|
2647 incallIndicatorParam.SetCipheringIndicatorAllowed( |
|
2648 iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
|
2649 |
|
2650 // Set the emergency status |
|
2651 if( EPEStateIdle != iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) ) |
|
2652 { |
|
2653 incallIndicatorParam.SetEmergency( ETrue ); |
|
2654 } |
|
2655 |
|
2656 if( aCallState == EPSCTsyCallStateDisconnecting ) |
|
2657 { |
|
2658 if ( TopAppIsDisplayedL() ) |
|
2659 { |
|
2660 if ( ( !IsOnScreenDialerSupported() ) || |
|
2661 ( IsOnScreenDialerSupported() && !IsNumberEntryVisibleL() ) ) |
|
2662 { |
|
2663 // Phone application is in the foreground so we don't need to |
|
2664 // display the little bubble. If we don't hide it here then |
|
2665 // it will appear for a short time. We don't want that. |
|
2666 incallIndicatorParam.SetLittleBubbleVisible( EFalse ); |
|
2667 } |
|
2668 } |
|
2669 } |
|
2670 |
|
2671 // Update the in-call indicator |
|
2672 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateIncallIndicator, |
|
2673 &incallIndicatorParam ); |
|
2674 } |
|
2675 |
|
2676 // ----------------------------------------------------------- |
|
2677 // CPhoneState::UpdateProfileDisplayL |
2270 // CPhoneState::UpdateProfileDisplayL |
2678 // ----------------------------------------------------------- |
2271 // ----------------------------------------------------------- |
2679 // |
2272 // |
2680 void CPhoneState::UpdateProfileDisplayL() |
2273 void CPhoneState::UpdateProfileDisplayL() |
2681 { |
2274 { |
2682 } |
2275 } |
2683 |
2276 |
2684 // ----------------------------------------------------------- |
|
2685 // CPhoneState::UpdateOperatorDisplayL |
|
2686 // ----------------------------------------------------------- |
|
2687 // |
|
2688 void CPhoneState::UpdateOperatorDisplayL() |
|
2689 { |
|
2690 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateOperatorDisplayL( ) "); |
|
2691 __PHONELOG( EBasic, EPhoneControl, "CPhoneState::UpdateOperatorDisplayL" ); |
|
2692 // Get current title pane content. |
|
2693 TTelTitleDisplay titleContent; |
|
2694 titleContent.iDisplayTag.Zero(); |
|
2695 titleContent.iLogoHandle = 0; |
|
2696 TPckg<TTelTitleDisplay> titlePckg( titleContent ); |
|
2697 |
|
2698 RProperty::Get( |
|
2699 KPSUidTelInformation, |
|
2700 KTelDisplayInfo, |
|
2701 titlePckg ); |
|
2702 |
|
2703 if ( TitlePaneIsVisibleL() ) |
|
2704 { |
|
2705 // There is a title pane icon. |
|
2706 if ( titleContent.iLogoHandle != 0 ) |
|
2707 { |
|
2708 // Set new logo. |
|
2709 __PHONELOG( EBasic, EPhoneControl, |
|
2710 "CPhoneState::UpdateOperatorDisplayL - logo found" ); |
|
2711 |
|
2712 if( iLogoHandle != titleContent.iLogoHandle ) |
|
2713 { |
|
2714 __PHONELOG( EBasic, EPhoneControl, |
|
2715 "CPhoneState::UpdateOperatorDisplayL - set new logo" ); |
|
2716 |
|
2717 TPhoneCmdParamBitmap bitmapParam; |
|
2718 |
|
2719 // Duplicate bitmap from handle. |
|
2720 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; |
|
2721 CleanupStack::PushL( bitmap ); |
|
2722 User::LeaveIfError( |
|
2723 bitmap->Duplicate( titleContent.iLogoHandle ) ); |
|
2724 bitmapParam.SetBitmap( bitmap ); |
|
2725 |
|
2726 // Duplicate and set bitmap mask if needed |
|
2727 CFbsBitmap* maskBitmap = NULL; |
|
2728 if( titleContent.iLogoMaskHandle != 0 ) |
|
2729 { |
|
2730 maskBitmap = new( ELeave )CFbsBitmap; |
|
2731 CleanupStack::PushL( maskBitmap ); |
|
2732 User::LeaveIfError( maskBitmap->Duplicate( |
|
2733 titleContent.iLogoMaskHandle ) ); |
|
2734 bitmapParam.SetMaskBitmap( maskBitmap ); |
|
2735 } |
|
2736 |
|
2737 iViewCommandHandle->ExecuteCommandL( |
|
2738 EPhoneViewSetTitlePanePicture, |
|
2739 &bitmapParam ); |
|
2740 |
|
2741 // The title pane takes ownership of the bitmaps so no need |
|
2742 // to destroy it here. |
|
2743 if( maskBitmap ) |
|
2744 { |
|
2745 // Pop maskBitmap only, if it has been created |
|
2746 CleanupStack::Pop( maskBitmap ); |
|
2747 } |
|
2748 CleanupStack::Pop( bitmap ); |
|
2749 } |
|
2750 } |
|
2751 else |
|
2752 { |
|
2753 __PHONELOG1( EBasic, EPhoneControl, |
|
2754 "CPhoneState::UpdateOperatorDisplayL - set text=%S", &titleContent.iDisplayTag ); |
|
2755 iLogoHandle = titleContent.iLogoHandle; |
|
2756 |
|
2757 iViewCommandHandle->ExecuteCommandL( |
|
2758 EPhoneViewSetTitlePaneContent, |
|
2759 0, |
|
2760 titleContent.iDisplayTag ); |
|
2761 } |
|
2762 } |
|
2763 |
|
2764 // Check background image. |
|
2765 TPhoneCmdParamBitmap savedBitmapParam; |
|
2766 iViewCommandHandle->ExecuteCommandL( |
|
2767 EPhoneViewGetBackgroundImageBitmap, |
|
2768 &savedBitmapParam ); |
|
2769 |
|
2770 if ( titleContent.iBackgroundImageHandle != |
|
2771 savedBitmapParam.Bitmap()->Handle() ) |
|
2772 { |
|
2773 __PHONELOG2( EBasic, EPhoneControl, |
|
2774 "CPhoneState::UpdateOperatorDisplayL - update background image since different titleContent(%d), saved(%d)", |
|
2775 titleContent.iBackgroundImageHandle, savedBitmapParam.Bitmap()->Handle() ); |
|
2776 // Background image has changed. Duplicate bitmap from handle if |
|
2777 // available; otherwise reset the background image |
|
2778 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; |
|
2779 CleanupStack::PushL( bitmap ); |
|
2780 TInt err = KErrNone; |
|
2781 if ( titleContent.iBackgroundImageHandle != 0 ) |
|
2782 { |
|
2783 err = bitmap->Duplicate( titleContent.iBackgroundImageHandle ); |
|
2784 } |
|
2785 else |
|
2786 { |
|
2787 bitmap->Reset(); |
|
2788 } |
|
2789 |
|
2790 if ( err == KErrNone ) |
|
2791 { |
|
2792 iBitmapRedrawCounter = titleContent.iBackgroundImageRedrawCounter; |
|
2793 TPhoneCmdParamBitmap bitmapParam; |
|
2794 bitmapParam.SetBitmap( bitmap ); |
|
2795 iViewCommandHandle->ExecuteCommandL( |
|
2796 EPhoneViewSetBackgroundImageBitmap, |
|
2797 &bitmapParam ); |
|
2798 } |
|
2799 |
|
2800 CleanupStack::PopAndDestroy( bitmap ); |
|
2801 } |
|
2802 else if ( titleContent.iBackgroundImageRedrawCounter != |
|
2803 iBitmapRedrawCounter ) |
|
2804 { |
|
2805 iBitmapRedrawCounter = titleContent.iBackgroundImageRedrawCounter; |
|
2806 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateView ); |
|
2807 } |
|
2808 } |
|
2809 |
2277 |
2810 // ----------------------------------------------------------- |
2278 // ----------------------------------------------------------- |
2811 // CPhoneState::HandleInitiatedEmergencyCallL |
2279 // CPhoneState::HandleInitiatedEmergencyCallL |
2812 // Default handling for EPEMessageInitiatedEmergencyCallL message |
2280 // Default handling for EPEMessageInitiatedEmergencyCallL message |
2813 // (other items were commented in a header). |
2281 // (other items were commented in a header). |
3475 { |
2935 { |
3476 TPhoneCmdParamBoolean boolParam; |
2936 TPhoneCmdParamBoolean boolParam; |
3477 TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( |
2937 TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( |
3478 EPhoneViewSetTouchPaneButtons, |
2938 EPhoneViewSetTouchPaneButtons, |
3479 &boolParam ) ); |
2939 &boolParam ) ); |
3480 SetTouchPaneVisible( EFalse ); |
|
3481 } |
|
3482 } |
|
3483 |
|
3484 // --------------------------------------------------------- |
|
3485 // CPhoneState::SetTouchPaneVisible |
|
3486 // --------------------------------------------------------- |
|
3487 // |
|
3488 EXPORT_C void CPhoneState::SetTouchPaneVisible( TBool aVisible ) |
|
3489 { |
|
3490 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
3491 { |
|
3492 TPhoneCmdParamBoolean booleanParam; |
|
3493 booleanParam.SetBoolean( aVisible ); |
|
3494 TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( |
|
3495 EPhoneViewSetTouchPaneVisible, |
|
3496 &booleanParam ) ); |
|
3497 } |
|
3498 } |
|
3499 |
|
3500 // ---------------------------------------------------------------------------- |
|
3501 // CPhoneState::SetTouchButtonEnabled |
|
3502 // ---------------------------------------------------------------------------- |
|
3503 // |
|
3504 EXPORT_C void CPhoneState::SetTouchPaneButtonEnabled( TInt aCommandId ) |
|
3505 { |
|
3506 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
3507 { |
|
3508 TPhoneCmdParamInteger commandParam; |
|
3509 commandParam.SetInteger( aCommandId ); |
|
3510 iViewCommandHandle->ExecuteCommand( EPhoneViewEnableTouchButton, |
|
3511 &commandParam ); |
|
3512 } |
|
3513 } |
|
3514 |
|
3515 // ---------------------------------------------------------------------------- |
|
3516 // CPhoneState::SetTouchButtonDisabled |
|
3517 // ---------------------------------------------------------------------------- |
|
3518 // |
|
3519 EXPORT_C void CPhoneState::SetTouchPaneButtonDisabled( TInt aCommandId ) |
|
3520 { |
|
3521 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
3522 { |
|
3523 TPhoneCmdParamInteger commandParam; |
|
3524 commandParam.SetInteger( aCommandId ); |
|
3525 |
|
3526 iViewCommandHandle->ExecuteCommand( EPhoneViewDisableTouchButton, |
|
3527 &commandParam ); |
|
3528 } |
2940 } |
3529 } |
2941 } |
3530 |
2942 |
3531 // --------------------------------------------------------- |
2943 // --------------------------------------------------------- |
3532 // CPhoneState::HandleLongHashL |
2944 // CPhoneState::HandleLongHashL |
3534 // |
2946 // |
3535 EXPORT_C void CPhoneState::HandleLongHashL() |
2947 EXPORT_C void CPhoneState::HandleLongHashL() |
3536 { |
2948 { |
3537 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleLongHashL() "); |
2949 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleLongHashL() "); |
3538 |
2950 |
3539 TPhoneCmdParamInteger numberEntryCountParam; |
|
3540 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount, |
|
3541 &numberEntryCountParam ); |
|
3542 TInt neLength( numberEntryCountParam.Integer() ); |
|
3543 |
|
3544 if( iCustomization && iCustomization->AllowAlphaNumericMode() ) |
|
3545 { |
|
3546 if ( NumberEntryManagerL()->NumberEntryInNumericModeL() ) |
|
3547 { |
|
3548 if ( neLength == 0 ) |
|
3549 { |
|
3550 OnlyHashInNumberEntryL(); |
|
3551 } |
|
3552 |
|
3553 if ( neLength == 1 ) |
|
3554 { |
|
3555 NumberEntryClearL(); |
|
3556 } |
|
3557 } |
|
3558 NumberEntryManagerL()->NumberEntryToggleAlphaNumericModeL(); |
|
3559 } |
|
3560 else |
|
3561 { |
|
3562 if( neLength == 1 ) |
|
3563 { |
|
3564 TPhoneCmdParamBoolean isSecurityMode; |
|
3565 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode ); |
|
3566 |
|
3567 if ( !isSecurityMode.Boolean() ) |
|
3568 { |
|
3569 OnlyHashInNumberEntryL(); |
|
3570 } |
|
3571 } |
|
3572 } |
|
3573 } |
|
3574 |
|
3575 // ----------------------------------------------------------- |
|
3576 // CPhoneState::OpenVKBL |
|
3577 // ----------------------------------------------------------- |
|
3578 // |
|
3579 void CPhoneState::OpenVkbL() |
|
3580 { |
|
3581 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::OpenVKB() "); |
|
3582 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenVirtualKeyBoard ); |
|
3583 } |
2951 } |
3584 |
2952 |
3585 // ----------------------------------------------------------- |
2953 // ----------------------------------------------------------- |
3586 // CPhoneState::BeginUiUpdateLC |
2954 // CPhoneState::BeginUiUpdateLC |
3587 // ----------------------------------------------------------- |
2955 // ----------------------------------------------------------- |
3594 TCleanupItem operation( UiUpdateCleanup, this ); |
2962 TCleanupItem operation( UiUpdateCleanup, this ); |
3595 CleanupStack::PushL( operation ); |
2963 CleanupStack::PushL( operation ); |
3596 } |
2964 } |
3597 |
2965 |
3598 // ----------------------------------------------------------- |
2966 // ----------------------------------------------------------- |
3599 // CPhoneState::BeginTransEffectLC |
|
3600 // ----------------------------------------------------------- |
|
3601 // |
|
3602 EXPORT_C void CPhoneState::BeginTransEffectLC( TStateTransEffectType aType ) |
|
3603 { |
|
3604 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::BeginTransEffectLC( ) "); |
|
3605 TPhoneCmdParamTransEffect effectParam; |
|
3606 |
|
3607 switch ( aType ) |
|
3608 { |
|
3609 case ENumberEntryOpen: |
|
3610 effectParam.SetType( EPhoneTransEffectDialerOpen ); |
|
3611 break; |
|
3612 case ENumberEntryClose: |
|
3613 effectParam.SetType( EPhoneTransEffectDialerClose ); |
|
3614 break; |
|
3615 case ENumberEntryCreate: |
|
3616 effectParam.SetType( EPhoneTransEffectDialerCreate ); |
|
3617 break; |
|
3618 default: |
|
3619 effectParam.SetType( EPhoneTransEffectNone ); |
|
3620 } |
|
3621 |
|
3622 iViewCommandHandle->ExecuteCommand( EPhoneViewBeginTransEffect, &effectParam ); |
|
3623 |
|
3624 TCleanupItem operation( EffectCleanup, this ); |
|
3625 CleanupStack::PushL( operation ); |
|
3626 } |
|
3627 |
|
3628 // ----------------------------------------------------------- |
|
3629 // CPhoneState::EndUiUpdate |
2967 // CPhoneState::EndUiUpdate |
3630 // ----------------------------------------------------------- |
2968 // ----------------------------------------------------------- |
3631 // |
2969 // |
3632 EXPORT_C void CPhoneState::EndUiUpdate() |
2970 EXPORT_C void CPhoneState::EndUiUpdate() |
3633 { |
2971 { |
3634 CleanupStack::PopAndDestroy(); // Call UiUpdateCleanup |
2972 CleanupStack::PopAndDestroy(); // Call UiUpdateCleanup |
3635 } |
|
3636 |
|
3637 // ----------------------------------------------------------- |
|
3638 // CPhoneState::EndTransEffect |
|
3639 // ----------------------------------------------------------- |
|
3640 // |
|
3641 EXPORT_C void CPhoneState::EndTransEffect() |
|
3642 { |
|
3643 CleanupStack::PopAndDestroy(); // Call EffectCleanup |
|
3644 } |
2973 } |
3645 |
2974 |
3646 // ----------------------------------------------------------- |
2975 // ----------------------------------------------------------- |
3647 // CPhoneState::CheckIfShowTerminationNote |
2976 // CPhoneState::CheckIfShowTerminationNote |
3648 // This method is intended to be overridden in states |
2977 // This method is intended to be overridden in states |
3686 // |
3015 // |
3687 void CPhoneState::UiUpdateCleanup(TAny* aThis ) |
3016 void CPhoneState::UiUpdateCleanup(TAny* aThis ) |
3688 { |
3017 { |
3689 static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
3018 static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
3690 EPhoneViewEndUpdate ); |
3019 EPhoneViewEndUpdate ); |
3691 } |
|
3692 |
|
3693 // ----------------------------------------------------------------------------- |
|
3694 // CPhoneState::EffectCleanup |
|
3695 // ----------------------------------------------------------------------------- |
|
3696 // |
|
3697 void CPhoneState::EffectCleanup(TAny* aThis ) |
|
3698 { |
|
3699 TPhoneCmdParamTransEffect effectParam; |
|
3700 effectParam.SetType( EPhoneTransEffectStop ); |
|
3701 |
|
3702 static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
|
3703 EPhoneViewEndTransEffect, &effectParam ); |
|
3704 } |
|
3705 |
|
3706 // ----------------------------------------------------------------------------- |
|
3707 // CPhoneState::IsDTMFEditorVisibleL |
|
3708 // ----------------------------------------------------------------------------- |
|
3709 // |
|
3710 EXPORT_C TBool CPhoneState::IsDTMFEditorVisibleL() const |
|
3711 { |
|
3712 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsDTMFEditorVisibleL( ) "); |
|
3713 return iViewCommandHandle->HandleCommandL( |
|
3714 EPhoneViewIsDTMFEditorVisible ) == |
|
3715 EPhoneViewResponseSuccess; |
|
3716 } |
|
3717 |
|
3718 // ----------------------------------------------------------------------------- |
|
3719 // CPhoneState::CloseDTMFEditorL |
|
3720 // ----------------------------------------------------------------------------- |
|
3721 // |
|
3722 EXPORT_C void CPhoneState::CloseDTMFEditorL() |
|
3723 { |
|
3724 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseDTMFEditorL()"); |
|
3725 if ( iOnScreenDialer ) // Touch |
|
3726 { |
|
3727 TPhoneCmdParamBoolean booleanParam; |
|
3728 booleanParam.SetBoolean( EFalse ); |
|
3729 // Disable dialer DTMF mode |
|
3730 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
|
3731 &booleanParam ); |
|
3732 |
|
3733 // Closing effect is shown when DTMF dialer exist. |
|
3734 BeginTransEffectLC( ENumberEntryClose ); |
|
3735 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
3736 EndTransEffect(); |
|
3737 } |
|
3738 else // Non-Touch |
|
3739 { |
|
3740 // If dtmf query is visible then remove number entry |
|
3741 // because it should not be shown if user has pressed end key. |
|
3742 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
3743 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
|
3744 } |
|
3745 |
|
3746 // Do state-specific behaviour if number entry is cleared |
|
3747 HandleNumberEntryClearedL(); |
|
3748 } |
3020 } |
3749 |
3021 |
3750 // ----------------------------------------------------------- |
3022 // ----------------------------------------------------------- |
3751 // CPhoneState::SetDefaultFlagsL() |
3023 // CPhoneState::SetDefaultFlagsL() |
3752 // ----------------------------------------------------------- |
3024 // ----------------------------------------------------------- |
4059 iCustomization ); |
3330 iCustomization ); |
4060 } |
3331 } |
4061 return iCallHeaderManager; |
3332 return iCallHeaderManager; |
4062 } |
3333 } |
4063 |
3334 |
4064 // ----------------------------------------------------------------------------- |
|
4065 // CPhoneState::CloseCustomizedDialerL |
|
4066 // ----------------------------------------------------------------------------- |
|
4067 // |
|
4068 EXPORT_C void CPhoneState::CloseCustomizedDialerL() |
|
4069 { |
|
4070 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseCustomizedDialerL( ) "); |
|
4071 |
|
4072 // Set dialer back to default mode. |
|
4073 iViewCommandHandle->HandleCommandL( EPhoneViewHideCustomizedDialer ); |
|
4074 |
|
4075 // Closing effect is shown when customized dialer exist. |
|
4076 BeginTransEffectLC( ENumberEntryClose ); |
|
4077 |
|
4078 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
4079 |
|
4080 EndTransEffect(); |
|
4081 // Do state-specific behaviour if number entry is cleared |
|
4082 HandleNumberEntryClearedL(); |
|
4083 } |
|
4084 |
|
4085 // ----------------------------------------------------------------------------- |
|
4086 // CPhoneState::CustomizedDialerMenuResourceId |
|
4087 // ----------------------------------------------------------------------------- |
|
4088 // |
|
4089 EXPORT_C TInt CPhoneState::CustomizedDialerMenuResourceIdL() |
|
4090 { |
|
4091 __LOGMETHODSTARTEND(EPhoneControl, |
|
4092 "CPhoneState::CustomizedDialerMenuResourceId( ) "); |
|
4093 // Get and return customized dialer menu resource id |
|
4094 TPhoneCmdParamInteger integerParam; |
|
4095 iViewCommandHandle->HandleCommandL( |
|
4096 EPhoneViewGetCustomizedDialerMenuResourceId, |
|
4097 &integerParam ); |
|
4098 return integerParam.Integer(); |
|
4099 } |
|
4100 |
|
4101 // ----------------------------------------------------------------------------- |
|
4102 // CPhoneState::CustomizedDialerCbaResourceId |
|
4103 // ----------------------------------------------------------------------------- |
|
4104 // |
|
4105 EXPORT_C TInt CPhoneState::CustomizedDialerCbaResourceIdL() |
|
4106 { |
|
4107 __LOGMETHODSTARTEND(EPhoneControl, |
|
4108 "CPhoneState::CustomizedDialerCbaResourceId( ) "); |
|
4109 // Get and return customized dialer CBA resource id |
|
4110 TPhoneCmdParamInteger integerParam; |
|
4111 iViewCommandHandle->HandleCommandL( |
|
4112 EPhoneViewGetCustomizedDialerCbaResourceId, |
|
4113 &integerParam ); |
|
4114 return integerParam.Integer(); |
|
4115 } |
|
4116 |
|
4117 // ----------------------------------------------------------- |
|
4118 // CPhoneState::ShowDtmfDialerL |
|
4119 // ----------------------------------------------------------- |
|
4120 // |
|
4121 void CPhoneState::ShowDtmfDialerL() |
|
4122 { |
|
4123 __LOGMETHODSTARTEND(EPhoneControl, |
|
4124 "CPhoneState::ShowDtmfDialerL()" ); |
|
4125 |
|
4126 // Set dialer to DTMF mode. |
|
4127 TPhoneCmdParamBoolean booleanParam; |
|
4128 booleanParam.SetBoolean( ETrue ); |
|
4129 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible, |
|
4130 &booleanParam ); |
|
4131 |
|
4132 BeginTransEffectLC( ENumberEntryCreate ); |
|
4133 |
|
4134 if ( IsNumberEntryUsedL() ) |
|
4135 { |
|
4136 // Store the number entry content to cache |
|
4137 if ( !IsNumberEntryContentStored() ) |
|
4138 { |
|
4139 StoreNumberEntryContentL(); |
|
4140 } |
|
4141 // Clear and display DTMF dialer |
|
4142 NumberEntryClearL(); |
|
4143 SetNumberEntryVisibilityL(ETrue); |
|
4144 } |
|
4145 else |
|
4146 { |
|
4147 // Create and display DTMF dialer |
|
4148 NumberEntryManagerL()->CreateNumberEntryL(); |
|
4149 } |
|
4150 |
|
4151 EndTransEffect(); |
|
4152 |
|
4153 // Update CBA |
|
4154 iCbaManager->UpdateInCallCbaL(); |
|
4155 } |
|
4156 |
|
4157 // ----------------------------------------------------------- |
3335 // ----------------------------------------------------------- |
4158 // CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer |
3336 // CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer |
4159 // ----------------------------------------------------------- |
3337 // ----------------------------------------------------------- |
4160 // |
3338 // |
4161 EXPORT_C void CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer() |
3339 EXPORT_C void CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer() |
4162 { |
3340 { |
4163 if ( IsOnScreenDialerSupported() ) |
3341 |
4164 { |
|
4165 TBool isDialerVisible( EFalse ); |
|
4166 TRAP_IGNORE( isDialerVisible = IsDTMFEditorVisibleL() ); |
|
4167 |
|
4168 if ( isDialerVisible ) |
|
4169 { |
|
4170 TRAP_IGNORE( CloseDTMFEditorL() ); |
|
4171 } |
|
4172 |
|
4173 // if the DTMF dialer is used before the idle message, we have to |
|
4174 // restore the original content of the number entry |
|
4175 if ( IsNumberEntryContentStored() ) |
|
4176 { |
|
4177 TBool isNumberEntryUsed( EFalse ); |
|
4178 TRAP_IGNORE( isNumberEntryUsed = IsNumberEntryUsedL() ); |
|
4179 |
|
4180 if ( !isNumberEntryUsed ) |
|
4181 { |
|
4182 TRAP_IGNORE( NumberEntryManagerL()->CreateNumberEntryL() ); |
|
4183 } |
|
4184 // Restore the number entry content from cache |
|
4185 TRAP_IGNORE( RestoreNumberEntryContentL() ); |
|
4186 } |
|
4187 } |
|
4188 } |
3342 } |
4189 |
3343 |
4190 // ----------------------------------------------------------- |
3344 // ----------------------------------------------------------- |
4191 // CPhoneState::IsOnScreenDialerSupported |
3345 // CPhoneState::IsOnScreenDialerSupported |
4192 // ----------------------------------------------------------- |
3346 // ----------------------------------------------------------- |
4342 { |
3474 { |
4343 NumberEntryManagerL()->StoreNumberEntryContentL(); |
3475 NumberEntryManagerL()->StoreNumberEntryContentL(); |
4344 } |
3476 } |
4345 |
3477 |
4346 // ----------------------------------------------------------- |
3478 // ----------------------------------------------------------- |
4347 // CPhoneState::RestoreNumberEntryContentL |
|
4348 // ----------------------------------------------------------- |
|
4349 // |
|
4350 EXPORT_C void CPhoneState::RestoreNumberEntryContentL() |
|
4351 { |
|
4352 NumberEntryManagerL()->RestoreNumberEntryContentL(); |
|
4353 } |
|
4354 |
|
4355 // ----------------------------------------------------------- |
|
4356 // CPhoneState::ClearNumberEntryContentCache |
3479 // CPhoneState::ClearNumberEntryContentCache |
4357 // ----------------------------------------------------------- |
3480 // ----------------------------------------------------------- |
4358 // |
3481 // |
4359 EXPORT_C void CPhoneState::ClearNumberEntryContentCache() |
3482 EXPORT_C void CPhoneState::ClearNumberEntryContentCache() |
4360 { |
3483 { |
4361 TRAP_IGNORE( NumberEntryManagerL()->ClearNumberEntryContentCache() ); |
3484 TRAP_IGNORE( NumberEntryManagerL()->ClearNumberEntryContentCache() ); |
4362 } |
|
4363 |
|
4364 // ----------------------------------------------------------- |
|
4365 // CPhoneState::HandleNumberEntryEdited |
|
4366 // ----------------------------------------------------------- |
|
4367 // |
|
4368 EXPORT_C void CPhoneState::HandleNumberEntryEdited() |
|
4369 { |
|
4370 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleNumberEntryEdited() "); |
|
4371 TRAP_IGNORE( NumberEntryManagerL()->HandleNumberEntryEdited() ); |
|
4372 } |
3485 } |
4373 |
3486 |
4374 // ----------------------------------------------------------------------------- |
3487 // ----------------------------------------------------------------------------- |
4375 // CPhoneState::IsAlphanumericSupportedAndCharInput |
3488 // CPhoneState::IsAlphanumericSupportedAndCharInput |
4376 // ----------------------------------------------------------------------------- |
3489 // ----------------------------------------------------------------------------- |