133 |
133 |
134 #include <gslauncher.h> // Call Settings launch. |
134 #include <gslauncher.h> // Call Settings launch. |
135 |
135 |
136 #include <dialingextensioninterface.h> |
136 #include <dialingextensioninterface.h> |
137 #include <easydialingcommands.hrh> |
137 #include <easydialingcommands.hrh> |
|
138 #include <AknIncallBubbleNotify.h> |
138 |
139 |
139 // Kastor effect IDs, aknskincontent/101f84b9.sel |
140 // Kastor effect IDs, aknskincontent/101f84b9.sel |
140 // These effects cannot be used for internal transitions (Call UI<->Dialer) |
141 // These effects cannot be used for internal transitions (Call UI<->Dialer) |
141 const TInt KTouchDialerOpenEffect = 3; |
142 const TInt KTouchDialerOpenEffect = 3; |
142 const TInt KTouchDialerCloseEffect = 5; |
143 const TInt KTouchDialerCloseEffect = 5; |
149 // might leave. |
150 // might leave. |
150 // --------------------------------------------------------------------------- |
151 // --------------------------------------------------------------------------- |
151 // |
152 // |
152 CPhoneViewController::CPhoneViewController() : |
153 CPhoneViewController::CPhoneViewController() : |
153 iEikEnv( *CEikonEnv::Static() ), |
154 iEikEnv( *CEikonEnv::Static() ), |
154 iNeedToReturnToForegroundAppAfterCall( EFalse ), |
|
155 iHelpCommand( KINCAL_HLP_CALL_HANDLING ), |
155 iHelpCommand( KINCAL_HLP_CALL_HANDLING ), |
156 iBlockingDialogIsDisplayed( EFalse ), |
156 iBlockingDialogIsDisplayed( EFalse ), |
157 iIdleUid( KErrNotFound ), |
157 iIdleUid( KErrNotFound ), |
158 iFetchContent( KNullDesC ), |
158 iFetchContent( KNullDesC ), |
159 iEffectOngoing( EFalse ), |
159 iEffectOngoing( EFalse ), |
160 iSendBack( ETrue ), |
160 iSendBack( ETrue ), |
161 iDialerActive( EFalse ), |
161 iDialerActive( EFalse ), |
162 iPriotityChanged( EFalse ) |
162 iPriotityChanged( EFalse ), |
|
163 iSecurityMode( ETrue ), |
|
164 iNeedToReturnToForegroundAppAfterCall( EFalse ) |
163 { |
165 { |
164 } |
166 } |
165 |
167 |
166 // --------------------------------------------------------------------------- |
168 // --------------------------------------------------------------------------- |
167 // CPhoneViewController::ConstructL |
169 // CPhoneViewController::ConstructL |
178 iStatusPane->ReserveTitlePane( *this ); |
180 iStatusPane->ReserveTitlePane( *this ); |
179 |
181 |
180 iAppui = (CAknAppUi*)iEikEnv.EikAppUi(); |
182 iAppui = (CAknAppUi*)iEikEnv.EikAppUi(); |
181 iCba = iEikEnv.AppUiFactory()->Cba(); |
183 iCba = iEikEnv.AppUiFactory()->Cba(); |
182 |
184 |
183 iPhoneView = CPhoneView::NewL( aRect, *iCba ); |
185 iPhoneView = CPhoneView::NewL( aRect, *iCba, this ); |
184 |
186 |
185 iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect ); |
187 iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect ); |
186 |
188 |
187 iPhoneView->SetControl( iBubbleWrapper->Control() ); |
189 iPhoneView->SetControl( iBubbleWrapper->Control() ); |
188 iPhoneView->ActivateL(); // We're ready to activate view after the bubble is initialized |
190 iPhoneView->ActivateL(); // We're ready to activate view after the bubble is initialized |
255 User::LeaveIfError( iKeyLock.Connect() ); |
257 User::LeaveIfError( iKeyLock.Connect() ); |
256 |
258 |
257 // if you are using sgc-client's session to capserver, |
259 // if you are using sgc-client's session to capserver, |
258 //you are not allowed to close the session. |
260 //you are not allowed to close the session. |
259 iAknUiServerClient = CAknSgcClient::AknSrv(); |
261 iAknUiServerClient = CAknSgcClient::AknSrv(); |
|
262 |
|
263 iIncallBubble = CAknIncallBubble::NewL(); |
260 } |
264 } |
261 |
265 |
262 // ----------------------------------------------------------------------------- |
266 // ----------------------------------------------------------------------------- |
263 // CPhoneViewController::NewL |
267 // CPhoneViewController::NewL |
264 // Two-phased constructor. |
268 // Two-phased constructor. |
327 RemoveAddToContactDialog(); |
331 RemoveAddToContactDialog(); |
328 |
332 |
329 // delete iStatusPane; <-- CCoeStatic are destroyed outside application |
333 // delete iStatusPane; <-- CCoeStatic are destroyed outside application |
330 |
334 |
331 iApaLsSession.Close(); |
335 iApaLsSession.Close(); |
332 |
336 |
|
337 delete iIncallBubble; |
333 } |
338 } |
334 |
339 |
335 // --------------------------------------------------------- |
340 // --------------------------------------------------------- |
336 // CPhoneViewController::PhoneView |
341 // CPhoneViewController::PhoneView |
337 // --------------------------------------------------------- |
342 // --------------------------------------------------------- |
3624 { |
3629 { |
3625 // If current layout is different than flat layout then we |
3630 // If current layout is different than flat layout then we |
3626 // need to do PushDefault for navipane and SwitchLayoutL for |
3631 // need to do PushDefault for navipane and SwitchLayoutL for |
3627 // statuspane. |
3632 // statuspane. |
3628 if ( currentLayout != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || |
3633 if ( currentLayout != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || |
3629 currentLayout != R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) |
3634 currentLayout != R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) |
3630 { |
3635 { |
3631 SwapEmptyIndicatorPaneInSecureStateL( ETrue ); |
3636 SwapEmptyIndicatorPaneInSecureStateL( ETrue ); |
3632 |
3637 |
3633 // Push default so that Operator name can be shown in title pane. |
3638 // Push default so that Operator name can be shown in title pane. |
3634 iStatusPane->NaviPane().PushDefaultL(); |
3639 iStatusPane->NaviPane().PushDefaultL(); |
3639 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); |
3644 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); |
3640 } |
3645 } |
3641 else |
3646 else |
3642 { |
3647 { |
3643 iStatusPane->StatusPane().SwitchLayoutL |
3648 iStatusPane->StatusPane().SwitchLayoutL |
3644 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ); |
3649 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); |
3645 } |
3650 } |
3646 } |
3651 } |
3647 } |
3652 } |
3648 else |
3653 else |
3649 { |
3654 { |
3650 // If current layout is flat layout then do Pop for navipane, |
3655 // If current layout is flat layout then do Pop for navipane, |
3651 // layout is something else there is no need to do Pop and |
3656 // layout is something else there is no need to do Pop and |
3652 // SwitchLayoutL for statuspane. |
3657 // SwitchLayoutL for statuspane. |
3653 if ( currentLayout == R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || |
3658 if ( currentLayout == R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT || |
3654 currentLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) |
3659 currentLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) |
3655 { |
3660 { |
3656 SwapEmptyIndicatorPaneInSecureStateL( EFalse ); |
3661 SwapEmptyIndicatorPaneInSecureStateL( EFalse ); |
3657 |
3662 |
3658 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3663 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3659 { |
3664 { |
3661 ( R_AVKON_STATUS_PANE_LAYOUT_IDLE ); |
3666 ( R_AVKON_STATUS_PANE_LAYOUT_IDLE ); |
3662 } |
3667 } |
3663 else |
3668 else |
3664 { |
3669 { |
3665 iStatusPane->StatusPane().SwitchLayoutL |
3670 iStatusPane->StatusPane().SwitchLayoutL |
3666 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE ); |
3671 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); |
3667 } |
3672 } |
3668 } |
3673 } |
3669 } |
3674 } |
3670 // ApplyCurrentSettingsL is called whenever statuspane |
3675 // ApplyCurrentSettingsL is called whenever statuspane |
3671 // visibility status or pane layout changes. |
3676 // visibility status or pane layout changes. |
3772 // |
3777 // |
3773 void CPhoneViewController::SetControltoDialerL() |
3778 void CPhoneViewController::SetControltoDialerL() |
3774 { |
3779 { |
3775 __PHONELOG1( EBasic, EPhoneUIView, |
3780 __PHONELOG1( EBasic, EPhoneUIView, |
3776 "CPhoneViewController::SetControltoDialerL iDialerActive (%d)", iDialerActive ); |
3781 "CPhoneViewController::SetControltoDialerL iDialerActive (%d)", iDialerActive ); |
|
3782 |
|
3783 SetIncallBubbleVisibility( ETrue ); |
3777 |
3784 |
3778 if ( !iDialerActive ) |
3785 if ( !iDialerActive ) |
3779 { |
3786 { |
3780 iDialerActive = ETrue; |
3787 iDialerActive = ETrue; |
3781 |
3788 |
3818 void CPhoneViewController::SetControltoCallHandlingL() |
3825 void CPhoneViewController::SetControltoCallHandlingL() |
3819 { |
3826 { |
3820 __PHONELOG1( EBasic, EPhoneUIView, |
3827 __PHONELOG1( EBasic, EPhoneUIView, |
3821 "CPhoneViewController::SetControltoCallHandlingL iDialerActive (%d)", iDialerActive ); |
3828 "CPhoneViewController::SetControltoCallHandlingL iDialerActive (%d)", iDialerActive ); |
3822 |
3829 |
3823 // Do not show toolbar if emergency call is active |
3830 SetIncallBubbleVisibility( EFalse ); |
3824 if ( !iIncallIndicator->IsEmergencyCall() ) |
3831 iToolbarController->ShowToolbar(); |
3825 { |
|
3826 iToolbarController->ShowToolbar(); |
|
3827 } |
|
3828 if ( iDialerActive ) |
3832 if ( iDialerActive ) |
3829 { |
3833 { |
3830 iDialerActive = EFalse; |
3834 iDialerActive = EFalse; |
3831 // Hide dialer view. Do this before resizing status pane to prevent unnecessary |
3835 // Hide dialer view. Do this before resizing status pane to prevent unnecessary |
3832 // resizing of dialer components. Hiding dialer view already before showing |
3836 // resizing of dialer components. Hiding dialer view already before showing |
4082 TBool CPhoneViewController::GetNeedToReturnToForegroundAppAfterCall() const |
4086 TBool CPhoneViewController::GetNeedToReturnToForegroundAppAfterCall() const |
4083 { |
4087 { |
4084 return iNeedToReturnToForegroundAppAfterCall; |
4088 return iNeedToReturnToForegroundAppAfterCall; |
4085 } |
4089 } |
4086 |
4090 |
|
4091 // --------------------------------------------------------------------------- |
|
4092 // CPhoneViewController::AllowInCallBubbleInSpecialCases |
|
4093 // --------------------------------------------------------------------------- |
|
4094 // |
|
4095 void CPhoneViewController::AllowInCallBubbleInSpecialCases() |
|
4096 { |
|
4097 // this method can be used for special cases like dialer |
|
4098 |
|
4099 if( iDialerActive ) |
|
4100 { |
|
4101 SetIncallBubbleVisibility( ETrue ); |
|
4102 } |
|
4103 else |
|
4104 { |
|
4105 SetIncallBubbleVisibility( EFalse ); |
|
4106 } |
|
4107 |
|
4108 } |
|
4109 |
|
4110 // --------------------------------------------------------------------------- |
|
4111 // CPhoneViewController::SetIncallBubbleVisibility |
|
4112 // --------------------------------------------------------------------------- |
|
4113 // |
|
4114 void CPhoneViewController::SetIncallBubbleVisibility( TBool aVisible ) |
|
4115 { |
|
4116 __PHONELOG1( EBasic, EPhoneUIView, |
|
4117 "CPhoneViewController::SetIncallBubbleVisibility(%d)", |
|
4118 aVisible ); |
|
4119 |
|
4120 TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); |
|
4121 } |
|
4122 |
4087 // End of File |
4123 // End of File |