# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272376592 -10800 # Node ID 9941bcf9934865ab8184e37f79f8dc0f39e221c2 # Parent f392bfb21e08bb149df2e01b0a9b987352cb3ba9 Revision: 201015 Kit: 201017 diff -r f392bfb21e08 -r 9941bcf99348 gsprofilesrv_plat/settings_framework_api/inc/MGSWatchDog.h --- a/gsprofilesrv_plat/settings_framework_api/inc/MGSWatchDog.h Wed Apr 14 16:15:29 2010 +0300 +++ b/gsprofilesrv_plat/settings_framework_api/inc/MGSWatchDog.h Tue Apr 27 16:56:32 2010 +0300 @@ -23,6 +23,11 @@ // System includes #include +#ifdef _DEBUG + #define GS_ENABLE_WATCH_DOG +#endif + + // CONSTANTS // CLASS DECLARATION diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSApplication/Src/GSMainContainer.cpp --- a/gssettingsuis/Gs/GSApplication/Src/GSMainContainer.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSApplication/Src/GSMainContainer.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -126,6 +126,12 @@ // void CGSMainContainer::UpdateListBoxL() { + + if( iPluginArray->Count() == 0 ) + { + return; + } + __GSLOGSTRING( "[CGSMainContainer::UpdateListBoxL]" ); // Empty item array because it will be reoccupied. diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSApplication/Src/GSMainView.cpp --- a/gssettingsuis/Gs/GSApplication/Src/GSMainView.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSApplication/Src/GSMainView.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -144,9 +144,7 @@ // void CGSMainView::OpenLocalizedResourceFileL( const TDesC& aResourceFileName ) { - RFs fsSession; - User::LeaveIfError( fsSession.Connect() ); - CleanupClosePushL( fsSession ); + RFs &fsSession = CCoeEnv::Static()->FsSession(); // Find the resource file TParse parse; @@ -158,8 +156,6 @@ // Open resource file iResourceLoader.OpenL( fileName ); - - CleanupStack::PopAndDestroy( &fsSession ); } diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSApplication/Src/GSUi.cpp --- a/gssettingsuis/Gs/GSApplication/Src/GSUi.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSApplication/Src/GSUi.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -179,15 +179,11 @@ switch ( aCommand ) { case EEikCmdExit: - GSDocument().WatchDog()->ReportCleanExitL(); - Exit(); - break; case EAknCmdExit: + case EAknSoftkeyExit: + #ifdef GS_ENABLE_WATCH_DOG GSDocument().WatchDog()->ReportCleanExitL(); - Exit(); - break; - case EAknSoftkeyExit: - GSDocument().WatchDog()->ReportCleanExitL(); + #endif Exit(); break; default: @@ -308,7 +304,9 @@ new( ELeave ) CAknInformationNote( ETrue ); note->ExecuteLD( *prompt ); CleanupStack::PopAndDestroy( prompt ); +#ifdef GS_ENABLE_WATCH_DOG GSDocument().WatchDog()->ReportCleanExitL(); +#endif Exit(); } @@ -423,7 +421,9 @@ { case MGSEComObserver::EPluginRemoved: __GSLOGSTRING( "[CGSUi::HandleAppListEvent] Closing GS..." ); - TRAP_IGNORE( GSDocument().WatchDog()->ReportCleanExitL() ); + #ifdef GS_ENABLE_WATCH_DOG + TRAP_IGNORE( GSDocument().WatchDog()->ReportCleanExitL() ); + #endif Exit(); break; default: diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertPluginContainer.cpp --- a/gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertPluginContainer.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertPluginContainer.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -136,7 +136,17 @@ // --------------------------------------------------------------------------- void CGSCallDivertPluginContainer::MakeVideoDivertsItemL() { - iListboxItemArray->SetItemVisibilityL( EGSSettIdVideoDivert, - CGSListBoxItemTextArray::EVisible ); + + if ( FeatureManager::FeatureSupported( + KFeatureIdCsVideoTelephony ) ) + { + iListboxItemArray->SetItemVisibilityL( EGSSettIdVideoDivert, + CGSListBoxItemTextArray::EVisible ); + } + else + { + iListboxItemArray->SetItemVisibilityL( EGSSettIdVideoDivert, + CGSListBoxItemTextArray::EInvisible ); + } } //End of file diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSDisplayPlugin/Src/GSDisplayPlugin.cpp --- a/gssettingsuis/Gs/GSDisplayPlugin/Src/GSDisplayPlugin.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSDisplayPlugin/Src/GSDisplayPlugin.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -478,7 +478,7 @@ if ( !dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) { #ifdef FF_POWER_SAVE - if ( iPsmActive->Mode() == EPsmsrvModeNormal ) + if ( iPsmActive->Mode() != EPsmsrvModePowerSave ) { #endif //FF_POWER_SAVE iModel->SetContrastL( oldValue ); @@ -512,7 +512,7 @@ if ( !dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged ) ) { #ifdef FF_POWER_SAVE - if ( iPsmActive->Mode() == EPsmsrvModeNormal ) + if ( iPsmActive->Mode() != EPsmsrvModePowerSave ) { #endif //FF_POWER_SAVE iModel->SetBrightnessL( oldValue ); @@ -545,7 +545,7 @@ if ( !dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) { #ifdef FF_POWER_SAVE - if ( iPsmActive->Mode() == EPsmsrvModeNormal ) + if ( iPsmActive->Mode() != EPsmsrvModePowerSave ) { #endif //FF_POWER_SAVE iModel->SetAmbientLightSensorL( oldValue ); diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/inc/GSPluginAndViewIdCache.h --- a/gssettingsuis/Gs/GSFramework/inc/GSPluginAndViewIdCache.h Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/inc/GSPluginAndViewIdCache.h Tue Apr 27 16:56:32 2010 +0300 @@ -221,8 +221,8 @@ // UI - not owned CEikAppUi& iAppUi; - // File server session - owned - RFs iFsSession; + // File server session - ref + RFs& iFsSession; // Cache table - owned RHashMap< TUid /* KEY = view id */, TCacheEntry /* VALUE */ > iLookupTable; diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSBaseDocument.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSBaseDocument.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSBaseDocument.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -38,7 +38,8 @@ // EXPORT_C CGSBaseDocument::CGSBaseDocument( CEikApplication& aApp ) : CAknDocument( aApp ), - iUnloadWrapperObjects( KGSPluginWrapperObjectGranularity ) + iUnloadWrapperObjects( KGSPluginWrapperObjectGranularity ), + iWatchDog ( NULL ) { } @@ -65,7 +66,9 @@ iUnloadWrapperObjects.Close(); delete iPluginViewIdCache; +#ifdef GS_ENABLE_WATCH_DOG delete iWatchDog; +#endif iImplInfoArray.ResetAndDestroy();// This is needed iImplInfoArray.Close(); @@ -80,7 +83,9 @@ // EXPORT_C void CGSBaseDocument::ConstructL() { +#ifdef GS_ENABLE_WATCH_DOG iWatchDog = CGSWatchDog::NewL(); +#endif REComSession::ListImplementationsL( KGSPluginInterfaceUid, diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSBaseView.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSBaseView.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSBaseView.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -270,8 +270,7 @@ const TDesC& aResourceFileName, RConeResourceLoader& aResourceLoader ) { - RFs fsSession; - User::LeaveIfError( fsSession.Connect() ); + RFs &fsSession = CCoeEnv::Static()->FsSession(); // Find the resource file: TParse parse; @@ -283,10 +282,6 @@ // Open resource file: aResourceLoader.OpenL( fileName ); - - // If leave occurs before this, close is called automatically when the - // thread exits. - fsSession.Close(); } diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -156,7 +156,10 @@ // Adding plugin data to lbx has a lot of CGSPluginInterface API calls. // -> A good place to use quarantine to catch panicking plugins in // any of these calls. - iGSWatchDog->QuarantineL( plugin->Id() ); + #ifdef GS_ENABLE_WATCH_DOG + iGSWatchDog->QuarantineL( plugin->Id() ); + #endif + if( plugin->Visible() ) { AddPluginDataToLbxL( plugin, @@ -164,7 +167,9 @@ icons, iconCounter ); } - iGSWatchDog->RemoveFromQuarantineL( plugin->Id() ); + #ifdef GS_ENABLE_WATCH_DOG + iGSWatchDog->RemoveFromQuarantineL( plugin->Id() ); + #endif } // 2) Replace old icon array if needed. diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -152,8 +152,7 @@ const TDesC& aResourceFileName, RConeResourceLoader& aResourceLoader ) { - RFs fsSession; - User::LeaveIfError( fsSession.Connect() ); + RFs &fsSession = CCoeEnv::Static()->FsSession(); // Find the resource file: TParse parse; @@ -165,10 +164,6 @@ // Open resource file: aResourceLoader.OpenL( fileName ); - - // If leave occurs before this, close is called automatically when the - // thread exits. - fsSession.Close(); } diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSPluginAndViewIdCache.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSPluginAndViewIdCache.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSPluginAndViewIdCache.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -42,7 +42,7 @@ // --------------------------------------------------------------------------- // CGSPluginAndViewIdCache::CGSPluginAndViewIdCache( CEikAppUi& aAppUi ) -: iAppUi( aAppUi ), iLookupTable( &HashFunction, &HashIdentityRelation ) +: iAppUi( aAppUi ), iFsSession(CCoeEnv::Static()->FsSession()),iLookupTable( &HashFunction, &HashIdentityRelation ) { } @@ -60,7 +60,6 @@ DestroyShims(); iLookupTable.Close(); // - iFsSession.Close(); } @@ -72,7 +71,6 @@ // void CGSPluginAndViewIdCache::ConstructL() { - User::LeaveIfError( iFsSession.Connect() ); User::LeaveIfError( iFsSession.CreatePrivatePath( EDriveC ) ); // iPlaceholderView = CGSPlaceholderView::NewL( iAppUi ); diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSFramework/src/GSPluginLoader.cpp --- a/gssettingsuis/Gs/GSFramework/src/GSPluginLoader.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSFramework/src/GSPluginLoader.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -486,12 +486,16 @@ &info->DisplayName(), iParentUid.iUid ); CGSPluginInterface* plugin = NULL; TInt error = KErrCancel; + #ifdef GS_ENABLE_WATCH_DOG if( !iWatchDog->IsInBlackList( info->ImplementationUid() ) ) + #endif { // Only panics move quarantined plugins to blacklist. Leaving is // normal programmatic functionality and therefore does not move // plugin to blacklist. - iWatchDog->QuarantineL( info->ImplementationUid() ); + #ifdef GS_ENABLE_WATCH_DOG + iWatchDog->QuarantineL( info->ImplementationUid() ); + #endif #ifdef _GS_PERFORMANCE_TRACES TTime timeStart; @@ -508,7 +512,9 @@ __GSLOGSTRING2( "[GSPlgLoader::LoadNextPluginL/perf] %Ld (%S)", funcDuration, &info->DisplayName() ); #endif //_GS_PERFORMANCE_TRACES - TRAP_IGNORE( iWatchDog->RemoveFromQuarantineL( info->ImplementationUid() ); ); + #ifdef GS_ENABLE_WATCH_DOG + TRAP_IGNORE( iWatchDog->RemoveFromQuarantineL( info->ImplementationUid() ); ); + #endif } if( error == KErrNone ) { diff -r f392bfb21e08 -r 9941bcf99348 gssettingsuis/Gs/GSPDataHSDPAPlugin/src/GSPDataHSDPAPlugin.cpp --- a/gssettingsuis/Gs/GSPDataHSDPAPlugin/src/GSPDataHSDPAPlugin.cpp Wed Apr 14 16:15:29 2010 +0300 +++ b/gssettingsuis/Gs/GSPDataHSDPAPlugin/src/GSPDataHSDPAPlugin.cpp Tue Apr 27 16:56:32 2010 +0300 @@ -460,9 +460,8 @@ if( iProfileEngine->ActiveProfileId() != EProfileOffLineId ) { - User::LeaveIfError( rSession.Connect() ); - rSession.SetState( RStarterSession::EOffline ); - rSession.SetState( RStarterSession::ENormal ); + User::LeaveIfError( rSession.Connect() ); + rSession.ResetNetwork(); rSession.Close(); }