185 iStatusPane->StatusPane().SetDimmed( iSecurityMode ); |
185 iStatusPane->StatusPane().SetDimmed( iSecurityMode ); |
186 |
186 |
187 iAppui = (CAknAppUi*)iEikEnv.EikAppUi(); |
187 iAppui = (CAknAppUi*)iEikEnv.EikAppUi(); |
188 iCba = iEikEnv.AppUiFactory()->Cba(); |
188 iCba = iEikEnv.AppUiFactory()->Cba(); |
189 |
189 |
190 iPhoneView = CPhoneView::NewL( aRect, *iCba, this ); |
190 iPhoneView = CPhoneView::NewL( aRect, *iCba, this ); |
191 |
191 |
192 iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect ); |
192 iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect ); |
193 |
193 |
194 iPhoneView->SetControl( iBubbleWrapper->Control() ); |
194 iPhoneView->SetControl( iBubbleWrapper->Control() ); |
195 iPhoneView->ActivateL(); // We're ready to activate view after the bubble is initialized |
195 iPhoneView->ActivateL(); // We're ready to activate view after the bubble is initialized |
247 iBubbleWrapper->SetNumberEntry( iDialer->NumberEntry() ); |
247 iBubbleWrapper->SetNumberEntry( iDialer->NumberEntry() ); |
248 iBubbleWrapper->SetNumberEntryObserver( *this ); |
248 iBubbleWrapper->SetNumberEntryObserver( *this ); |
249 // Finalise dialer view |
249 // Finalise dialer view |
250 iDialerView->SetControl( iDialer ); |
250 iDialerView->SetControl( iDialer ); |
251 iDialerView->ActivateL(); |
251 iDialerView->ActivateL(); |
252 |
252 |
253 // Create controller for Easy Dialing |
253 // Create controller for Easy Dialing |
254 iEasyDialingController = CPhoneEasyDialingController::NewL( *iDialer ); |
254 iEasyDialingController = CPhoneEasyDialingController::NewL( *iDialer ); |
255 iDialerController->SetEasyDialingController( iEasyDialingController ); |
255 iDialerController->SetEasyDialingController( iEasyDialingController ); |
256 |
256 |
257 // Create controller for DTMF mode of the dialer |
257 // Create controller for DTMF mode of the dialer |
258 iDtmfDialerController = CPhoneDtmfDialerController::NewL( iBubbleWrapper, |
258 iDtmfDialerController = CPhoneDtmfDialerController::NewL( iBubbleWrapper, |
259 *coeEnv ); |
259 *coeEnv ); |
260 } |
260 } |
261 |
261 |
262 User::LeaveIfError( iKeyLock.Connect() ); |
262 User::LeaveIfError( iKeyLock.Connect() ); |
263 |
263 |
264 // if you are using sgc-client's session to capserver, |
264 // if you are using sgc-client's session to capserver, |
265 //you are not allowed to close the session. |
265 //you are not allowed to close the session. |
266 iAknUiServerClient = CAknSgcClient::AknSrv(); |
266 iAknUiServerClient = CAknSgcClient::AknSrv(); |
267 |
267 |
268 iIncallBubble = CAknIncallBubble::NewL(); |
268 iIncallBubble = CAknIncallBubble::NewL(); |
269 |
269 |
270 User::LeaveIfError( iSkinServerSession.Connect( this ) ); |
270 User::LeaveIfError( iSkinServerSession.Connect( this ) ); |
271 } |
271 } |
272 |
272 |
273 // ----------------------------------------------------------------------------- |
273 // ----------------------------------------------------------------------------- |
274 // CPhoneViewController::NewL |
274 // CPhoneViewController::NewL |
292 CPhoneViewController::~CPhoneViewController() |
292 CPhoneViewController::~CPhoneViewController() |
293 { |
293 { |
294 __LOGMETHODSTARTEND( EPhoneUIView, |
294 __LOGMETHODSTARTEND( EPhoneUIView, |
295 "CPhoneViewController::~CPhoneViewController()" ); |
295 "CPhoneViewController::~CPhoneViewController()" ); |
296 iSkinServerSession.Close(); |
296 iSkinServerSession.Close(); |
297 |
297 |
298 delete iButtonsController; |
298 delete iButtonsController; |
299 delete iDialerController; |
299 delete iDialerController; |
300 delete iToolbarController; |
300 delete iToolbarController; |
301 iKeyLock.Close(); |
301 iKeyLock.Close(); |
302 delete iApplicationExit; |
302 delete iApplicationExit; |
378 if ( iDialer && iDialerActive ) |
378 if ( iDialer && iDialerActive ) |
379 { |
379 { |
380 SetControltoCallHandlingL(); |
380 SetControltoCallHandlingL(); |
381 iBubbleWrapper->RemoveNumberEntry(); |
381 iBubbleWrapper->RemoveNumberEntry(); |
382 iPhoneView->SetActivatePreviousApp( EFalse ); |
382 iPhoneView->SetActivatePreviousApp( EFalse ); |
383 |
383 |
384 TPhoneCmdParamCallStateData callStateData; |
384 TPhoneCmdParamCallStateData callStateData; |
385 callStateData.SetCallState( EPEStateConnected ); |
385 callStateData.SetCallState( EPEStateConnected ); |
386 iBubbleWrapper->GetCallIdByState( &callStateData ); |
386 iBubbleWrapper->GetCallIdByState( &callStateData ); |
387 TInt connected = callStateData.CallId(); |
387 TInt connected = callStateData.CallId(); |
388 |
388 |
389 // If video call |
389 // If video call |
390 if( connected == KVideoTelephonyCallId1 || |
390 if( connected == KVideoTelephonyCallId1 || |
391 connected == KVideoTelephonyCallId2 ) |
391 connected == KVideoTelephonyCallId2 ) |
392 { |
392 { |
393 TPhoneCmdParamInteger uidParam; |
393 TPhoneCmdParamInteger uidParam; |
1184 TPhoneCmdParamBoolean* booleanParam = |
1185 TPhoneCmdParamBoolean* booleanParam = |
1185 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
1186 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
1186 iToolbarController->DimToolbar( booleanParam->Boolean()); |
1187 iToolbarController->DimToolbar( booleanParam->Boolean()); |
1187 break; |
1188 break; |
1188 } |
1189 } |
1189 |
1190 |
1190 case EPhoneViewSetInvalidCsPhoneNumberFlag: |
1191 case EPhoneViewSetInvalidCsPhoneNumberFlag: |
1191 iMenuController->SetInvalidCsPhoneNumberFlag( aCommandParam ); |
1192 iMenuController->SetInvalidCsPhoneNumberFlag( aCommandParam ); |
1192 break; |
1193 break; |
1193 |
1194 |
1194 case EPhoneViewGetInvalidCsPhoneNumberFlag: |
1195 case EPhoneViewGetInvalidCsPhoneNumberFlag: |
1195 iMenuController->GetInvalidCsPhoneNumberFlag( aCommandParam ); |
1196 iMenuController->GetInvalidCsPhoneNumberFlag( aCommandParam ); |
1196 break; |
1197 break; |
1197 |
1198 |
1198 case EPhoneViewGetEasyDialingMenuId: |
1199 case EPhoneViewGetEasyDialingMenuId: |
1497 static_cast<MPhoneButtonCustomization*>( pointerParam->Pointer() ); |
1498 static_cast<MPhoneButtonCustomization*>( pointerParam->Pointer() ); |
1498 iButtonsController->SetCustomization( customization ); |
1499 iButtonsController->SetCustomization( customization ); |
1499 } |
1500 } |
1500 } |
1501 } |
1501 break; |
1502 break; |
1502 |
1503 |
1503 case EPhoneViewEnableToolbarButton: |
1504 case EPhoneViewEnableToolbarButton: |
1504 { |
1505 { |
1505 TPhoneCmdParamInteger* integerParam = |
1506 TPhoneCmdParamInteger* integerParam = |
1506 static_cast<TPhoneCmdParamInteger*>( aCommandParam ); |
1507 static_cast<TPhoneCmdParamInteger*>( aCommandParam ); |
1507 iToolbarController->SetToolbarButtonDimmed( integerParam->Integer(), EFalse ); |
1508 iToolbarController->SetToolbarButtonDimmed( integerParam->Integer(), EFalse ); |
1508 } |
1509 } |
1509 break; |
1510 break; |
1510 |
1511 |
1511 case EPhoneViewGetQwertyModeObserver: |
1512 case EPhoneViewGetQwertyModeObserver: |
1512 { |
1513 { |
1513 TPhoneCmdParamPointer* ptrParam = static_cast<TPhoneCmdParamPointer*>( aCommandParam ); |
1514 TPhoneCmdParamPointer* ptrParam = static_cast<TPhoneCmdParamPointer*>( aCommandParam ); |
1514 ptrParam->SetPointer( static_cast<TAny*>( iDialer ) ); |
1515 ptrParam->SetPointer( static_cast<TAny*>( iDialer ) ); |
1515 } |
1516 } |
1632 BeginTransEffectForAppStartFromDialerLC( LogsUiCmdStarterConsts::KLogsUID3 ); |
1633 BeginTransEffectForAppStartFromDialerLC( LogsUiCmdStarterConsts::KLogsUID3 ); |
1633 LogsUiCmdStarter::CmdStartL( LogsUiCmdStarterConsts::KDialledView()); |
1634 LogsUiCmdStarter::CmdStartL( LogsUiCmdStarterConsts::KDialledView()); |
1634 EndTransEffect(); |
1635 EndTransEffect(); |
1635 } |
1636 } |
1636 break; |
1637 break; |
1637 |
1638 |
1638 case EPhoneDialerCmdContacts: |
1639 case EPhoneDialerCmdContacts: |
1639 { |
1640 { |
1640 // Launch Phonebook application |
1641 // Launch Phonebook application |
1641 TPhoneCmdParamAppInfo appInfoParam; |
1642 TPhoneCmdParamAppInfo appInfoParam; |
1642 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
1643 appInfoParam.SetAppUid( KPhoneUidAppPhonebook ); |
1643 BeginTransEffectForAppStartFromDialerLC( appInfoParam.AppUid() ); |
1644 BeginTransEffectForAppStartFromDialerLC( appInfoParam.AppUid() ); |
1644 ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam ); |
1645 ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam ); |
1645 EndTransEffect(); |
1646 EndTransEffect(); |
1646 } |
1647 } |
1647 break; |
1648 break; |
1648 |
1649 |
1649 case EPhoneDialerCmdSpeedDial: |
1650 case EPhoneDialerCmdSpeedDial: |
1650 { |
1651 { |
1651 // Launch speeddial application. |
1652 // Launch speeddial application. |
1652 TPhoneCmdParamAppInfo appInfoParam; |
1653 TPhoneCmdParamAppInfo appInfoParam; |
1653 appInfoParam.SetAppUid( KUidSpdia ); |
1654 appInfoParam.SetAppUid( KUidSpdia ); |
1654 ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam ); |
1655 ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam ); |
1655 break; |
1656 break; |
1656 } |
1657 } |
1657 |
1658 |
1658 case EPhoneDialerCallSettings: |
1659 case EPhoneDialerCallSettings: |
1659 { |
1660 { |
1660 CGSLauncher* launcher = CGSLauncher::NewLC(); |
1661 CGSLauncher* launcher = CGSLauncher::NewLC(); |
1661 launcher->LaunchGSViewL( TUid::Uid( 0x102824A2), |
1662 launcher->LaunchGSViewL( TUid::Uid( 0x102824A2), |
1662 TUid::Uid( 0x100058B3), |
1663 TUid::Uid( 0x100058B3), |
1663 KNullDesC8 ); |
1664 KNullDesC8 ); |
1664 CleanupStack::PopAndDestroy( launcher ); |
1665 CleanupStack::PopAndDestroy( launcher ); |
1665 break; |
1666 break; |
1666 } |
1667 } |
1667 |
1668 |
1668 case EPhoneViewIsDTMFEditorVisible: |
1669 case EPhoneViewIsDTMFEditorVisible: |
1669 if ( iDialer ) |
1670 if ( iDialer ) |
1670 { |
1671 { |
1671 viewResponse = ( IsDtmfDialerActive() ? |
1672 viewResponse = ( IsDtmfDialerActive() ? |
1672 EPhoneViewResponseSuccess : |
1673 EPhoneViewResponseSuccess : |
1703 ExecuteCommandL( EPhoneViewCreateNumberEntry, &booleanParam ); |
1704 ExecuteCommandL( EPhoneViewCreateNumberEntry, &booleanParam ); |
1704 } |
1705 } |
1705 // Set Number Entry CBA |
1706 // Set Number Entry CBA |
1706 TPhoneCmdParamInteger integerParam; |
1707 TPhoneCmdParamInteger integerParam; |
1707 if ( iSecurityMode ) |
1708 if ( iSecurityMode ) |
1708 { |
1709 { |
1709 iNoteController->DestroyNote(); |
1710 iNoteController->DestroyNote(); |
1710 integerParam.SetInteger( |
1711 integerParam.SetInteger( |
1711 CPhoneMainResourceResolver::Instance()-> |
1712 CPhoneMainResourceResolver::Instance()-> |
1712 ResolveResourceID( EPhoneEmergencyModeNoteCBA ) ); |
1713 ResolveResourceID( EPhoneEmergencyModeNoteCBA ) ); |
1713 } |
1714 } |
1714 else |
1715 else |
1715 { |
1716 { |
1716 integerParam.SetInteger( |
1717 integerParam.SetInteger( |
1717 CPhoneMainResourceResolver::Instance()-> |
1718 CPhoneMainResourceResolver::Instance()-> |
1718 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
1719 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
1719 } |
1720 } |
1720 ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ); |
1721 ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ); |
1721 // Set flag to false because dialler is set to open status. |
1722 // Set flag to false because dialler is set to open status. |
1722 iPhoneView->SetPhoneAppViewToDialer( EFalse ); |
1723 iPhoneView->SetPhoneAppViewToDialer( EFalse ); |
1723 } |
1724 } |
1724 break; |
1725 break; |
1734 if ( IsDtmfDialerActive() ) |
1735 if ( IsDtmfDialerActive() ) |
1735 { |
1736 { |
1736 static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() ) |
1737 static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() ) |
1737 ->ProcessCommandL( EPhoneDtmfDialerExit ); |
1738 ->ProcessCommandL( EPhoneDtmfDialerExit ); |
1738 } |
1739 } |
1739 else if ( iCustomization && |
1740 else if ( iCustomization && |
1740 IsCustomDialerActive() ) |
1741 IsCustomDialerActive() ) |
1741 { |
1742 { |
1742 iCustomization->HandleCommandL( |
1743 iCustomization->HandleCommandL( |
1743 *this, EPhoneViewOpenCallHandling, NULL ); |
1744 *this, EPhoneViewOpenCallHandling, NULL ); |
1744 } |
1745 } |
1745 else |
1746 else |
1746 { |
1747 { |
1747 SetControltoCallHandlingL(); |
1748 SetControltoCallHandlingL(); |
2176 { |
2185 { |
2177 return CPhoneStatusPane::Instance()->IsVisible(); |
2186 return CPhoneStatusPane::Instance()->IsVisible(); |
2178 } |
2187 } |
2179 |
2188 |
2180 // --------------------------------------------------------------------------- |
2189 // --------------------------------------------------------------------------- |
|
2190 // CPhoneViewController::IsEmergencyCallOngoing() |
|
2191 // --------------------------------------------------------------------------- |
|
2192 // |
|
2193 TBool CPhoneViewController::IsEmergencyCallOngoing() |
|
2194 { |
|
2195 __LOGMETHODSTARTEND( EPhoneUIView, |
|
2196 "CPhoneViewController::IsEmergencyCallOngoing()"); |
|
2197 |
|
2198 TPhoneCmdParamCallStateData callStateData; |
|
2199 callStateData.SetCallState( EPEStateConnected ); |
|
2200 iBubbleWrapper->GetCallIdByState( &callStateData ); |
|
2201 TInt connected = callStateData.CallId(); |
|
2202 |
|
2203 callStateData.SetCallState( EPEStateConnecting ); |
|
2204 iBubbleWrapper->GetCallIdByState( &callStateData ); |
|
2205 TInt connecting = callStateData.CallId(); |
|
2206 |
|
2207 return ( ( connected == KEmergencyCallId ) || |
|
2208 ( connecting == KEmergencyCallId ) ); |
|
2209 } |
|
2210 |
|
2211 // --------------------------------------------------------------------------- |
2181 // CPhoneViewController::HandleSecurityModeChanged |
2212 // CPhoneViewController::HandleSecurityModeChanged |
2182 // --------------------------------------------------------------------------- |
2213 // --------------------------------------------------------------------------- |
2183 // |
2214 // |
2184 EXPORT_C void CPhoneViewController::HandleSecurityModeChanged( TBool aIsEnabled ) |
2215 EXPORT_C void CPhoneViewController::HandleSecurityModeChanged( TBool aIsEnabled ) |
2185 { |
2216 { |
2186 __PHONELOG1( EBasic, EPhoneUIView, |
2217 __PHONELOG1( EBasic, EPhoneUIView, |
2187 "CPhoneViewController::SetSecurityMode Mode = (%d)", aIsEnabled ); |
2218 "CPhoneViewController::HandleSecurityModeChanged Mode = (%d)", aIsEnabled ); |
2188 iToolbarController->DimToolbar( aIsEnabled ); |
2219 |
2189 iPhoneView->SetSecurityMode( aIsEnabled ); |
2220 TBool emergencyCallOngoing = IsEmergencyCallOngoing(); |
2190 iMenuController->SetSecurityMode( aIsEnabled ); |
2221 |
2191 |
2222 // Don't undim toolbar if emergency call is ongoing |
2192 TBool securityModeChanged = ( iSecurityMode != aIsEnabled ); |
2223 if ( !emergencyCallOngoing ) |
2193 |
2224 { |
2194 iSecurityMode = aIsEnabled; |
2225 iToolbarController->DimToolbar( aIsEnabled ); |
2195 |
2226 } |
2196 if ( iDialer ) |
2227 iPhoneView->SetSecurityMode( aIsEnabled ); |
2197 { |
2228 iMenuController->SetSecurityMode( aIsEnabled ); |
|
2229 |
|
2230 TBool securityModeChanged = ( iSecurityMode != aIsEnabled ); |
|
2231 |
|
2232 iSecurityMode = aIsEnabled; |
|
2233 |
|
2234 if ( iDialer ) |
|
2235 { |
2198 iDialerController->SetRestrictedDialer( aIsEnabled ); |
2236 iDialerController->SetRestrictedDialer( aIsEnabled ); |
2199 |
2237 |
2200 if ( iDialerActive && securityModeChanged ) |
2238 if ( iDialerActive && securityModeChanged ) |
2201 { |
2239 { |
2202 CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface(); |
2240 CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface(); |
2203 if ( easyDialing ) |
2241 if ( easyDialing ) |
2204 { |
2242 { |
2220 TRAP_IGNORE( easyDialing->SetInputL( buf ) ); |
2258 TRAP_IGNORE( easyDialing->SetInputL( buf ) ); |
2221 } |
2259 } |
2222 } |
2260 } |
2223 } |
2261 } |
2224 iDialer->RelayoutAndDraw(); |
2262 iDialer->RelayoutAndDraw(); |
2225 |
2263 |
2226 // also update cba if security mode changes while dialer is open |
2264 // Don't update cba here if emergency call is ongoing |
2227 TPhoneCmdParamInteger integerParam; |
2265 if ( !emergencyCallOngoing ) |
2228 if ( aIsEnabled ) |
2266 { |
2229 { |
2267 // also update cba if security mode changes while dialer is open |
2230 iNoteController->DestroyNote(); |
2268 TPhoneCmdParamInteger integerParam; |
2231 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2269 if ( aIsEnabled ) |
2232 ResolveResourceID( EPhoneEmergencyModeNoteCBA ) ); |
2270 { |
2233 } |
2271 iNoteController->DestroyNote(); |
2234 else |
2272 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2235 { |
2273 ResolveResourceID( EPhoneEmergencyModeNoteCBA ) ); |
2236 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2274 } |
2237 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
2275 else |
2238 } |
2276 { |
2239 TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) ); |
2277 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2240 |
2278 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
|
2279 } |
|
2280 TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) ); |
|
2281 } |
2241 if ( !aIsEnabled ) |
2282 if ( !aIsEnabled ) |
2242 { |
2283 { |
2243 TRAP_IGNORE( SwitchLayoutToFlatStatusPaneL( ETrue ) ); |
2284 TRAP_IGNORE( SwitchLayoutToFlatStatusPaneL( ETrue ) ); |
2244 } |
2285 } |
2245 } |
2286 } |
2246 } |
2287 } |
2247 if ( securityModeChanged ) |
2288 if ( securityModeChanged ) |
2248 { |
2289 { |
|
2290 // Update cba if security mode changes while emergency call is ongoing |
|
2291 if ( emergencyCallOngoing ) |
|
2292 { |
|
2293 TRAP_IGNORE( static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() ) |
|
2294 ->ProcessCommandL( EPhoneCmdUpdateEmergencyCba ) ); |
|
2295 } |
|
2296 |
2249 // Update status pane dimming |
2297 // Update status pane dimming |
2250 iStatusPane->StatusPane().SetDimmed( aIsEnabled ); |
2298 iStatusPane->StatusPane().SetDimmed( aIsEnabled ); |
2251 |
2299 |
2252 // Uncapture the App key for sure |
2300 // Uncapture the App key for sure |
2253 TPhoneCmdParamKeyCapture appKeyCaptureParam; |
2301 TPhoneCmdParamKeyCapture appKeyCaptureParam; |
2483 { |
2531 { |
2484 iPrevForegroundAppWg = ForegroundApplicationWindowGroupId(); |
2532 iPrevForegroundAppWg = ForegroundApplicationWindowGroupId(); |
2485 CAknSgcClient::MoveApp( phoneApp.WgId(), ESgcMoveAppToForeground ); |
2533 CAknSgcClient::MoveApp( phoneApp.WgId(), ESgcMoveAppToForeground ); |
2486 __PHONELOG1( EBasic, EPhoneUIView, |
2534 __PHONELOG1( EBasic, EPhoneUIView, |
2487 "CPhoneViewController::BringPhoneAppToForeground - Previous App WG ID: %d", |
2535 "CPhoneViewController::BringPhoneAppToForeground - Previous App WG ID: %d", |
2488 iPrevForegroundAppWg ); |
2536 iPrevForegroundAppWg ); |
2489 } |
2537 } |
2490 } |
2538 } |
2491 |
2539 |
2492 // --------------------------------------------------------------------------- |
2540 // --------------------------------------------------------------------------- |
2493 // CPhoneViewController::SetTopApplicationL |
2541 // CPhoneViewController::SetTopApplicationL |
3027 __LOGMETHODSTARTEND( EPhoneUIView, |
3075 __LOGMETHODSTARTEND( EPhoneUIView, |
3028 "CPhoneViewController::SpeedDialNumberTypeL() "); |
3076 "CPhoneViewController::SpeedDialNumberTypeL() "); |
3029 CPhCntSpeedDialMonitor::TSpdDialFieldInfo fieldInfo; |
3077 CPhCntSpeedDialMonitor::TSpdDialFieldInfo fieldInfo; |
3030 |
3078 |
3031 TBuf<KPhoneNumberEntryBufferSize> number; |
3079 TBuf<KPhoneNumberEntryBufferSize> number; |
3032 TContactItemId itemId = iSpeedDialController->GetSpeedDialFieldL( |
3080 TContactItemId itemId = iSpeedDialController->GetSpeedDialFieldL( |
3033 aSpeedDialLocation, |
3081 aSpeedDialLocation, |
3034 number, |
3082 number, |
3035 fieldInfo ); |
3083 fieldInfo ); |
3036 |
3084 |
3037 __PHONELOG1( EBasic, EPhoneUIView, |
3085 __PHONELOG1( EBasic, EPhoneUIView, |
3038 "CPhoneViewController::SpeedDialNumberTypeL - itemId = %d ", itemId ); |
3086 "CPhoneViewController::SpeedDialNumberTypeL - itemId = %d ", itemId ); |
3043 // --------------------------------------------------------------------------- |
3091 // --------------------------------------------------------------------------- |
3044 // CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo |
3092 // CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo |
3045 // --------------------------------------------------------------------------- |
3093 // --------------------------------------------------------------------------- |
3046 // |
3094 // |
3047 TPhoneNumberType CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo( |
3095 TPhoneNumberType CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo( |
3048 CPhCntSpeedDialMonitor::TSpdDialFieldInfo aFieldInfo ) |
3096 const CPhCntSpeedDialMonitor::TSpdDialFieldInfo& aFieldInfo ) |
3049 { |
3097 { |
3050 __LOGMETHODSTARTEND(EPhoneUIView, |
3098 __LOGMETHODSTARTEND(EPhoneUIView, |
3051 "CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo() "); |
3099 "CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo() "); |
3052 TPhoneNumberType retValue; |
3100 TPhoneNumberType retValue; |
3053 switch( aFieldInfo.iNumberType ) |
3101 switch( aFieldInfo.iNumberType ) |
3688 // ----------------------------------------------------------- |
3736 // ----------------------------------------------------------- |
3689 // CPhoneViewController::SingleItemFetchType |
3737 // CPhoneViewController::SingleItemFetchType |
3690 // ----------------------------------------------------------- |
3738 // ----------------------------------------------------------- |
3691 // |
3739 // |
3692 TInt CPhoneViewController::SingleItemFetchType() const |
3740 TInt CPhoneViewController::SingleItemFetchType() const |
3693 { |
3741 { |
3694 __LOGMETHODSTARTEND(EPhoneUIView, |
3742 __LOGMETHODSTARTEND(EPhoneUIView, |
3695 "CPhoneViewController::SingleItemFetchType()" ); |
3743 "CPhoneViewController::SingleItemFetchType()" ); |
3696 |
3744 |
3697 return iSingleItemFetchType; |
3745 return iSingleItemFetchType; |
3698 } |
3746 } |
3699 |
3747 |
3700 // --------------------------------------------------------------------------- |
3748 // --------------------------------------------------------------------------- |
3701 // CPhoneViewController::SwitchLayoutToFlatStatusPaneL |
3749 // CPhoneViewController::SwitchLayoutToFlatStatusPaneL |
3702 // --------------------------------------------------------------------------- |
3750 // --------------------------------------------------------------------------- |
3703 // |
3751 // |
3857 |
3905 |
3858 if ( !iDialerActive ) |
3906 if ( !iDialerActive ) |
3859 { |
3907 { |
3860 iDialerActive = ETrue; |
3908 iDialerActive = ETrue; |
3861 |
3909 |
3862 // Ensure that toolbar and menu commands are up-to-date |
3910 // Ensure that toolbar and menu commands are up-to-date |
3863 TBuf<1> temp; // we are only interested if the text is empty or not |
3911 TBuf<1> temp; // we are only interested if the text is empty or not |
3864 iDialer->GetTextFromNumberEntry( temp ); |
3912 iDialer->GetTextFromNumberEntry( temp ); |
3865 NumberEntryStateChanged( temp.Length() > 0 ); |
3913 NumberEntryStateChanged( temp.Length() > 0 ); |
3866 |
3914 |
3867 // Make dialer view top most |
3915 // Make dialer view top most |
3868 iDialerView->DrawableWindow()->SetOrdinalPosition( |
3916 iDialerView->DrawableWindow()->SetOrdinalPosition( |
3869 iPhoneView->DrawableWindow()->OrdinalPosition() ); |
3917 iPhoneView->DrawableWindow()->OrdinalPosition() ); |
3870 |
3918 |
3871 // Hide in-call view toolbar |
3919 // Hide in-call view toolbar |
3872 iToolbarController->HideToolbar(); |
3920 iToolbarController->HideToolbar(); |
3873 |
3921 |
3874 SwitchLayoutToFlatStatusPaneL( ETrue ); |
3922 SwitchLayoutToFlatStatusPaneL( ETrue ); |
3875 |
3923 |
3876 // Don't make dialer view visible before status pane is updated. |
3924 // Don't make dialer view visible before status pane is updated. |
3877 // This prevents unnecessary resizings. |
3925 // This prevents unnecessary resizings. |
3878 // But do it right away after it. Otherwice a black toolbar area is shortly shown. |
3926 // But do it right away after it. Otherwice a black toolbar area is shortly shown. |
3880 // Number entry is emptied when dialer is hidden but drawing doesn't |
3928 // Number entry is emptied when dialer is hidden but drawing doesn't |
3881 // succeed at that point as dialer is hidden first. So must draw |
3929 // succeed at that point as dialer is hidden first. So must draw |
3882 // dialer as soon as it becomes visible to prevent the flashing of |
3930 // dialer as soon as it becomes visible to prevent the flashing of |
3883 // number entry (DrawDeferred() isn't fast enough here). |
3931 // number entry (DrawDeferred() isn't fast enough here). |
3884 iDialerView->DrawNow(); |
3932 iDialerView->DrawNow(); |
3885 |
3933 |
3886 iPhoneView->DrawableWindow()->SetOrdinalPosition( -1 ); |
3934 iPhoneView->DrawableWindow()->SetOrdinalPosition( -1 ); |
3887 iPhoneView->MakeVisible( EFalse ); |
3935 iPhoneView->MakeVisible( EFalse ); |
3888 |
3936 |
3889 // Update control stack |
3937 // Update control stack |
3890 iAppui->AddToStackL( iDialerView ); |
3938 iAppui->AddToStackL( iDialerView ); |
3908 iDialerActive = EFalse; |
3956 iDialerActive = EFalse; |
3909 // Hide dialer view. Do this before resizing status pane to prevent unnecessary |
3957 // Hide dialer view. Do this before resizing status pane to prevent unnecessary |
3910 // resizing of dialer components. Hiding dialer view already before showing |
3958 // resizing of dialer components. Hiding dialer view already before showing |
3911 // phone view might cause screen flickering but tests have proven it doesn't happen. |
3959 // phone view might cause screen flickering but tests have proven it doesn't happen. |
3912 iDialerView->MakeVisible( EFalse ); |
3960 iDialerView->MakeVisible( EFalse ); |
3913 |
3961 |
3914 SwitchLayoutToFlatStatusPaneL( EFalse ); |
3962 SwitchLayoutToFlatStatusPaneL( EFalse ); |
3915 |
3963 |
3916 // Make call handling view top most |
3964 // Make call handling view top most |
3917 iPhoneView->DrawableWindow()->SetOrdinalPosition( |
3965 iPhoneView->DrawableWindow()->SetOrdinalPosition( |
3918 iDialerView->DrawableWindow()->OrdinalPosition() ); |
3966 iDialerView->DrawableWindow()->OrdinalPosition() ); |
4052 { |
4100 { |
4053 TBool ret = EFalse; |
4101 TBool ret = EFalse; |
4054 if ( iDialer ) |
4102 if ( iDialer ) |
4055 { |
4103 { |
4056 MPhoneDialerController* curController = iDialer->Controller(); |
4104 MPhoneDialerController* curController = iDialer->Controller(); |
4057 ret = ( curController && |
4105 ret = ( curController && |
4058 curController != iDialerController && |
4106 curController != iDialerController && |
4059 curController != iDtmfDialerController ); |
4107 curController != iDtmfDialerController ); |
4060 } |
4108 } |
4061 return ret; |
4109 return ret; |
4062 } |
4110 } |
4063 |
4111 |
4064 // ----------------------------------------------------------- |
4112 // ----------------------------------------------------------- |
4065 // CPhoneViewController::CanTransEffectBeUsed |
4113 // CPhoneViewController::CanTransEffectBeUsed |
4066 // ----------------------------------------------------------- |
4114 // ----------------------------------------------------------- |
4067 // |
4115 // |
4068 TBool CPhoneViewController::CanTransEffectBeUsed( |
4116 TBool CPhoneViewController::CanTransEffectBeUsed( |
4069 TPhoneTransEffectType aType ) |
4117 TPhoneTransEffectType aType ) |
4070 { |
4118 { |
4071 TBool okToUseEffect( EFalse ); |
4119 TBool okToUseEffect( EFalse ); |
4072 |
4120 |
4073 TBool isForeground = iAppui->IsForeground(); |
4121 TBool isForeground = iAppui->IsForeground(); |
4074 // Check whether the idle is on foreground |
4122 // Check whether the idle is on foreground |
4075 TBool idleInFore = ForegroundApplicationWindowGroupId() == IdleWindowGroupId() ? |
4123 TBool idleInFore = ForegroundApplicationWindowGroupId() == IdleWindowGroupId() ? |
4076 ETrue : EFalse; |
4124 ETrue : EFalse; |
4077 |
4125 |
4078 if ( isForeground && // Newer run effect if not at front |
4126 if ( isForeground && // Newer run effect if not at front |
4079 ( ( aType == EPhoneTransEffectDialerCreate && !iDialerActive ) || |
4127 ( ( aType == EPhoneTransEffectDialerCreate && !iDialerActive ) || |
4080 ( aType == EPhoneTransEffectDialerOpen && !iDialerActive && |
4128 ( aType == EPhoneTransEffectDialerOpen && !iDialerActive && |
4081 iBubbleWrapper->IsNumberEntryUsed() ) || |
4129 iBubbleWrapper->IsNumberEntryUsed() ) || |
4082 ( aType == EPhoneTransEffectDialerClose && iDialerActive ) ) ) |
4130 ( aType == EPhoneTransEffectDialerClose && iDialerActive ) ) ) |
4083 { |
4131 { |
4084 okToUseEffect = ETrue; |
4132 okToUseEffect = ETrue; |
4085 } |
4133 } |
4086 // In case transition is from idle to dialer show transition effects as well. |
4134 // In case transition is from idle to dialer show transition effects as well. |
4087 else if ( idleInFore && !iDialerActive && |
4135 else if ( idleInFore && !iDialerActive && |
4088 aType == EPhoneTransEffectDialerOpen ) |
4136 aType == EPhoneTransEffectDialerOpen ) |
4089 { |
4137 { |
4090 okToUseEffect = ETrue; |
4138 okToUseEffect = ETrue; |
4091 } |
4139 } |
4092 else if ( isForeground && iDialerActive && |
4140 else if ( isForeground && iDialerActive && |
4093 aType == EPhoneTransEffectAppStartFromDialer ) |
4141 aType == EPhoneTransEffectAppStartFromDialer ) |
4094 { |
4142 { |
4095 okToUseEffect = ETrue; |
4143 okToUseEffect = ETrue; |
4096 } |
4144 } |
4097 |
4145 |
4098 return okToUseEffect; |
4146 return okToUseEffect; |
4099 } |
4147 } |
4100 |
4148 |
4101 // ----------------------------------------------------------- |
4149 // ----------------------------------------------------------- |
4102 // CPhoneViewController::BeginTransEffectForAppStartFromDialerLC |
4150 // CPhoneViewController::BeginTransEffectForAppStartFromDialerLC |
4103 // ----------------------------------------------------------- |
4151 // ----------------------------------------------------------- |
4104 // |
4152 // |
4105 void CPhoneViewController::BeginTransEffectForAppStartFromDialerLC( |
4153 void CPhoneViewController::BeginTransEffectForAppStartFromDialerLC( |
4106 const TUid& aAppUid ) |
4154 const TUid& aAppUid ) |
4107 { |
4155 { |
4108 TPhoneCmdParamTransEffect effectParam; |
4156 TPhoneCmdParamTransEffect effectParam; |
4109 effectParam.SetType( EPhoneTransEffectAppStartFromDialer ); |
4157 effectParam.SetType( EPhoneTransEffectAppStartFromDialer ); |
4110 effectParam.SetAppUid( aAppUid ); |
4158 effectParam.SetAppUid( aAppUid ); |
4111 |
4159 |
4112 ExecuteCommand( EPhoneViewBeginTransEffect, &effectParam ); |
4160 ExecuteCommand( EPhoneViewBeginTransEffect, &effectParam ); |
4113 |
4161 |
4114 TCleanupItem operation( EffectCleanup, this ); |
4162 TCleanupItem operation( EffectCleanup, this ); |
4115 CleanupStack::PushL( operation ); |
4163 CleanupStack::PushL( operation ); |
4116 } |
4164 } |
4165 // --------------------------------------------------------------------------- |
4213 // --------------------------------------------------------------------------- |
4166 // CPhoneViewController::AllowInCallBubbleInSpecialCases |
4214 // CPhoneViewController::AllowInCallBubbleInSpecialCases |
4167 // --------------------------------------------------------------------------- |
4215 // --------------------------------------------------------------------------- |
4168 // |
4216 // |
4169 void CPhoneViewController::AllowInCallBubbleInSpecialCases() |
4217 void CPhoneViewController::AllowInCallBubbleInSpecialCases() |
4170 { |
4218 { |
4171 // this method can be used for special cases like dialer |
4219 // this method can be used for special cases like dialer |
4172 |
4220 |
4173 if( iDialerActive ) |
4221 if( iDialerActive ) |
4174 { |
4222 { |
4175 SetIncallBubbleVisibility( ETrue ); |
4223 SetIncallBubbleVisibility( ETrue ); |
4176 } |
4224 } |
4177 else |
4225 else |
4178 { |
4226 { |
4179 SetIncallBubbleVisibility( EFalse ); |
4227 SetIncallBubbleVisibility( EFalse ); |
4180 } |
4228 } |
4181 |
4229 } |
4182 } |
4230 |
4183 |
|
4184 // --------------------------------------------------------------------------- |
4231 // --------------------------------------------------------------------------- |
4185 // CPhoneViewController::SetIncallBubbleVisibility |
4232 // CPhoneViewController::SetIncallBubbleVisibility |
4186 // --------------------------------------------------------------------------- |
4233 // --------------------------------------------------------------------------- |
4187 // |
4234 // |
4188 void CPhoneViewController::SetIncallBubbleVisibility( TBool aVisible ) |
4235 void CPhoneViewController::SetIncallBubbleVisibility( TBool aVisible ) |
4189 { |
4236 { |
4190 __PHONELOG1( EBasic, EPhoneUIView, |
4237 __PHONELOG1( EBasic, EPhoneUIView, |
4191 "CPhoneViewController::SetIncallBubbleVisibility(%d)", |
4238 "CPhoneViewController::SetIncallBubbleVisibility(%d)", |
4192 aVisible ); |
4239 aVisible ); |
4193 |
4240 |
4194 TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); |
4241 TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); |
4195 } |
4242 } |
4196 |
4243 |
4197 // --------------------------------------------------------------------------- |
4244 // --------------------------------------------------------------------------- |
4198 // CPhoneViewController::SkinContentChanged |
4245 // CPhoneViewController::SkinContentChanged |
4199 // --------------------------------------------------------------------------- |
4246 // --------------------------------------------------------------------------- |