32 #include "cphoneview.h" |
32 #include "cphoneview.h" |
33 #include "cphonedialerview.h" |
33 #include "cphonedialerview.h" |
34 #include "tphonecommandparam.h" |
34 #include "tphonecommandparam.h" |
35 #include "cphonebubblewrapper.h" |
35 #include "cphonebubblewrapper.h" |
36 #include "tphonecmdparamcallstatedata.h" |
36 #include "tphonecmdparamcallstatedata.h" |
|
37 #include "tphonecmdparamKeycapture.h" |
37 #include "tphonecmdparaminteger.h" |
38 #include "tphonecmdparaminteger.h" |
38 #include "tphonecmdparamboolean.h" |
39 #include "tphonecmdparamboolean.h" |
39 #include "tphonecmdparamstring.h" |
40 #include "tphonecmdparamstring.h" |
40 #include "tphonecmdparamappinfo.h" |
41 #include "tphonecmdparamappinfo.h" |
41 #include "tphonecmdparammessageeditor.h" |
42 #include "tphonecmdparammessageeditor.h" |
2185 __PHONELOG1( EBasic, EPhoneUIView, |
2186 __PHONELOG1( EBasic, EPhoneUIView, |
2186 "CPhoneViewController::SetSecurityMode Mode = (%d)", aIsEnabled ); |
2187 "CPhoneViewController::SetSecurityMode Mode = (%d)", aIsEnabled ); |
2187 iToolbarController->DimToolbar( aIsEnabled ); |
2188 iToolbarController->DimToolbar( aIsEnabled ); |
2188 iPhoneView->SetSecurityMode( aIsEnabled ); |
2189 iPhoneView->SetSecurityMode( aIsEnabled ); |
2189 iMenuController->SetSecurityMode( aIsEnabled ); |
2190 iMenuController->SetSecurityMode( aIsEnabled ); |
|
2191 |
|
2192 TBool securityModeChanged = ( iSecurityMode != aIsEnabled ); |
|
2193 |
|
2194 iSecurityMode = aIsEnabled; |
|
2195 |
2190 if ( iDialer ) |
2196 if ( iDialer ) |
2191 { |
2197 { |
2192 iDialerController->SetRestrictedDialer( aIsEnabled ); |
2198 iDialerController->SetRestrictedDialer( aIsEnabled ); |
2193 |
2199 |
2194 if ( iDialerActive && iSecurityMode != aIsEnabled ) |
2200 if ( iDialerActive && securityModeChanged ) |
2195 { |
2201 { |
2196 CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface(); |
2202 CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface(); |
2197 if ( easyDialing ) |
2203 if ( easyDialing ) |
2198 { |
2204 { |
2199 if ( aIsEnabled ) |
2205 if ( aIsEnabled ) |
2229 { |
2235 { |
2230 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2236 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> |
2231 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
2237 ResolveResourceID( EPhoneNumberAcqCBA ) ); |
2232 } |
2238 } |
2233 TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) ); |
2239 TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) ); |
|
2240 |
|
2241 if ( !aIsEnabled ) |
|
2242 { |
|
2243 TRAP_IGNORE( SwitchLayoutToFlatStatusPaneL( ETrue ) ); |
|
2244 } |
2234 } |
2245 } |
2235 } |
2246 } |
2236 if ( iSecurityMode != aIsEnabled ) |
2247 if ( securityModeChanged ) |
2237 { |
2248 { |
2238 // Update status pane dimming |
2249 // Update status pane dimming |
2239 iStatusPane->StatusPane().SetDimmed( aIsEnabled ); |
2250 iStatusPane->StatusPane().SetDimmed( aIsEnabled ); |
2240 } |
2251 |
2241 iSecurityMode = aIsEnabled; |
2252 // Uncapture the App key for sure |
|
2253 TPhoneCmdParamKeyCapture appKeyCaptureParam; |
|
2254 appKeyCaptureParam.SetKey( EStdKeyApplication0 ); |
|
2255 appKeyCaptureParam.SetKeyCode( EKeyApplication0 ); |
|
2256 appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents ); |
|
2257 |
|
2258 iKeyCaptureController->StopCapturingKey( &appKeyCaptureParam ); |
|
2259 } |
2242 } |
2260 } |
2243 |
2261 |
2244 // --------------------------------------------------------------------------- |
2262 // --------------------------------------------------------------------------- |
2245 // CPhoneViewController::IdleAppUid |
2263 // CPhoneViewController::IdleAppUid |
2246 // --------------------------------------------------------------------------- |
2264 // --------------------------------------------------------------------------- |
3688 __LOGMETHODSTARTEND(EPhoneUIView, |
3706 __LOGMETHODSTARTEND(EPhoneUIView, |
3689 "CPhoneViewController::SwitchLayoutToFlatStatusPaneL()" ); |
3707 "CPhoneViewController::SwitchLayoutToFlatStatusPaneL()" ); |
3690 |
3708 |
3691 if ( aSwitch ) |
3709 if ( aSwitch ) |
3692 { |
3710 { |
3693 SwapEmptyIndicatorPaneInSecureStateL( ETrue ); |
3711 SwapEmptyIndicatorPaneL( ETrue ); |
3694 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3712 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3695 { |
3713 { |
3696 iStatusPane->StatusPane().SwitchLayoutL |
3714 iStatusPane->StatusPane().SwitchLayoutL |
3697 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); |
3715 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); |
3698 } |
3716 } |
3702 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); |
3720 ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ); |
3703 } |
3721 } |
3704 } |
3722 } |
3705 else |
3723 else |
3706 { |
3724 { |
3707 SwapEmptyIndicatorPaneInSecureStateL( EFalse ); |
3725 SwapEmptyIndicatorPaneL( EFalse ); |
3708 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3726 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
3709 { |
3727 { |
3710 iStatusPane->StatusPane().SwitchLayoutL |
3728 iStatusPane->StatusPane().SwitchLayoutL |
3711 ( R_AVKON_STATUS_PANE_LAYOUT_IDLE ); |
3729 ( R_AVKON_STATUS_PANE_LAYOUT_IDLE ); |
3712 } |
3730 } |
3721 iStatusPane->StatusPane().ApplyCurrentSettingsL(); |
3739 iStatusPane->StatusPane().ApplyCurrentSettingsL(); |
3722 iStatusPane->StatusPane().DrawNow(); |
3740 iStatusPane->StatusPane().DrawNow(); |
3723 } |
3741 } |
3724 |
3742 |
3725 // --------------------------------------------------------------------------- |
3743 // --------------------------------------------------------------------------- |
3726 // CPhoneViewController::SwapEmptyIndicatorPaneInSecureStateL |
3744 // CPhoneViewController::SwapEmptyIndicatorPaneL |
3727 // --------------------------------------------------------------------------- |
3745 // --------------------------------------------------------------------------- |
3728 // |
3746 // |
3729 void CPhoneViewController::SwapEmptyIndicatorPaneInSecureStateL( |
3747 void CPhoneViewController::SwapEmptyIndicatorPaneL( |
3730 const TBool aSwapEmpty ) |
3748 const TBool aSwapEmpty ) |
3731 { |
3749 { |
3732 __LOGMETHODSTARTEND(EPhoneUIView, |
3750 __LOGMETHODSTARTEND(EPhoneUIView, |
3733 "CPhoneViewController::SwapEmptyIndicatorPaneInSecureStateL()" ); |
3751 "CPhoneViewController::SwapEmptyIndicatorPaneL()" ); |
3734 if ( iSecurityMode ) |
3752 if ( iSecurityMode ) |
3735 { |
3753 { |
3736 if ( aSwapEmpty ) |
3754 if ( aSwapEmpty ) |
3737 { |
3755 { |
3738 if ( !iIndiContainer ) |
3756 if ( !iIndiContainer ) |
3749 { |
3767 { |
3750 //Restore previous indicator control |
3768 //Restore previous indicator control |
3751 iStatusPane->StatusPane().SwapControlL( |
3769 iStatusPane->StatusPane().SwapControlL( |
3752 TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl ); |
3770 TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl ); |
3753 } |
3771 } |
|
3772 } |
|
3773 else if ( iPreviousIndicatorControl |
|
3774 && iIndiContainer |
|
3775 && ( iIndiContainer == |
|
3776 iStatusPane->StatusPane().ControlL( |
|
3777 TUid::Uid( EEikStatusPaneUidIndic ) ) ) ) |
|
3778 { |
|
3779 //Restore previous indicator control if security mode is not on anymore |
|
3780 // and empty indicator pane is still in status pane. |
|
3781 iStatusPane->StatusPane().SwapControlL( |
|
3782 TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl ); |
3754 } |
3783 } |
3755 } |
3784 } |
3756 |
3785 |
3757 |
3786 |
3758 // --------------------------------------------------------------------------- |
3787 // --------------------------------------------------------------------------- |