# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1270062113 -10800 # Node ID bdac6c4623926c8eb0798fcb2bba088ceb7030e3 # Parent 23553eb4e47037782d8b54afc6d9da062052ac28 Revision: 201011 Kit: 201013 diff -r 23553eb4e470 -r bdac6c462392 gssettingsuis/Gs/GSNetworkPlugin/Inc/PSMNetworkPlugin.h --- a/gssettingsuis/Gs/GSNetworkPlugin/Inc/PSMNetworkPlugin.h Mon Mar 15 12:41:46 2010 +0200 +++ b/gssettingsuis/Gs/GSNetworkPlugin/Inc/PSMNetworkPlugin.h Wed Mar 31 22:01:53 2010 +0300 @@ -23,8 +23,10 @@ #include #include #include //CPsmPluginBase +#include class CGSNetworkPluginModel; +class CRepository; /** * PSMNetwork plugin stub @@ -67,9 +69,18 @@ */ TBool IsPhoneOfflineL() const; + /** + * To verify if the network mode needs to be changed. + * not change when from EPsmsrvModeNormal to EPsmsrvPartialMode + * and from EPsmsrvModePowerSave to EPsmsrvPartialMode + */ + TBool IsChangeNetworkMode( TPsmsrvMode& aOldMode, TPsmsrvMode aNewMode ); + private: // data CGSNetworkPluginModel *iModel; //data model + CRepository* iPsmRepository; + TPsmsrvMode iPsmMode; }; diff -r 23553eb4e470 -r bdac6c462392 gssettingsuis/Gs/GSNetworkPlugin/Src/PSMNetworkPlugin.cpp --- a/gssettingsuis/Gs/GSNetworkPlugin/Src/PSMNetworkPlugin.cpp Mon Mar 15 12:41:46 2010 +0200 +++ b/gssettingsuis/Gs/GSNetworkPlugin/Src/PSMNetworkPlugin.cpp Wed Mar 31 22:01:53 2010 +0300 @@ -53,6 +53,11 @@ __GSLOGSTRING( "[GS]-->[CPSMNetworkPlugin::ConstructL]" ); iModel = CGSNetworkPluginModel::NewL( NULL,NULL ); + iPsmRepository = CRepository::NewL( KCRUidPowerSaveMode ); + // Read from CenRep so iPsmMode gets correct init value + TInt psmMode; + iPsmRepository->Get( KPsmCurrentMode, psmMode ); + iPsmMode = ( TPsmsrvMode )psmMode; __GSLOGSTRING( "[GS]<--[CPSMNetworkPlugin::ConstructL]" ); } @@ -84,6 +89,8 @@ __GSLOGSTRING( "[CPSMNetworkPlugin::~CPSMNetworkPlugin]" ); delete iModel; iModel = NULL; + delete iPsmRepository; + iPsmRepository = NULL; } // --------------------------------------------------------- @@ -130,9 +137,10 @@ // void CPSMNetworkPlugin::DoModeChangeL( const TInt aMode ) { + TPsmsrvMode newMode = ( TPsmsrvMode )aMode; if ( !IsPhoneOfflineL() && FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ) && - iModel->IsNetworkModeVisible() ) + iModel->IsNetworkModeVisible() && IsChangeNetworkMode ( iPsmMode, newMode ) ) { RConfigInfoArray infoArray; @@ -141,7 +149,7 @@ info1.iConfigType = EConfigTypeInt; info1.iIntValue = iModel->GetNetworkMode(); infoArray.Append( info1 ); - + __GSLOGSTRING1( "[CPSMNetworkPlugin::NotifyModeChangeL] Switching to mode:%d", aMode ); __GSLOGSTRING1( "[CPSMNetworkPlugin::NotifyModeChangeL]: oldValue info1: %d", infoArray[0].iIntValue ); @@ -161,6 +169,26 @@ } } +// ---------------------------------------------------------------------------------- +// CPSMNetworkPlugin::IsChangeNetworkMode +// ---------------------------------------------------------------------------------- +// +TBool CPSMNetworkPlugin::IsChangeNetworkMode( TPsmsrvMode& aOldMode, TPsmsrvMode aNewMode ) + { + TPsmsrvMode oldMode = aOldMode; + aOldMode = aNewMode; + if ( ( oldMode == EPsmsrvModeNormal && aNewMode == EPsmsrvPartialMode ) + || ( oldMode == EPsmsrvModePowerSave && aNewMode + == EPsmsrvPartialMode ) ) + { + return EFalse; + } + else + { + return ETrue; + } + } + //End of File diff -r 23553eb4e470 -r bdac6c462392 gssettingsuis/Gs/help/data/xhtml.zip Binary file gssettingsuis/Gs/help/data/xhtml.zip has changed diff -r 23553eb4e470 -r bdac6c462392 profilesservices/ProfileEngine/ProfileScheduleEventSrc/CProfileChangeEvent.cpp --- a/profilesservices/ProfileEngine/ProfileScheduleEventSrc/CProfileChangeEvent.cpp Mon Mar 15 12:41:46 2010 +0200 +++ b/profilesservices/ProfileEngine/ProfileScheduleEventSrc/CProfileChangeEvent.cpp Wed Mar 31 22:01:53 2010 +0300 @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff -r 23553eb4e470 -r bdac6c462392 profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.cpp --- a/profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.cpp Mon Mar 15 12:41:46 2010 +0200 +++ b/profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.cpp Wed Mar 31 22:01:53 2010 +0300 @@ -27,7 +27,20 @@ #include "CProEngProfileImpl.h" #include "CProEngToneHandler.h" #include "CProEngProfileNameArrayImpl.h" +#include +#include +#include +#include +#include +#include +#include // RResourceFile +#include // BaflUtils +namespace + { + // The filename of the resource file + _LIT( KProEngResourceFileName, "Z:ProEngWrapper.RSC" ); + } // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -47,6 +60,8 @@ { iProfileEngine = CreateProfileEngineExtendedL(); iToneHandler = CProEngToneHandler::NewL(); + iFs = new ( ELeave ) RFs; + User::LeaveIfError( iFs->Connect() ); } // ----------------------------------------------------------------------------- @@ -125,6 +140,8 @@ iProfileEngine->Release(); } delete iToneHandler; + iFs->Close(); + delete iFs; } // ----------------------------------------------------------------------------- @@ -188,10 +205,45 @@ // CProEngEngineImpl::SetActiveProfileL // ----------------------------------------------------------------------------- // -void CProEngEngineImpl::SetActiveProfileL( TInt aId ) - { - iProfileEngine->SetActiveProfileL( aId ); - } +void CProEngEngineImpl::SetActiveProfileL(TInt aId) + { + if ( // active profile is Off-line + ( iProfileEngine->ActiveProfileId() == EProfileOffLineId ) && + // and currently focused profile is not Off-line + ( aId != EProfileOffLineId ) ) + { + + TInt simCStatus( ESimNotPresent ); + RProperty simStatus; + User::LeaveIfError( simStatus.Attach(KPSUidStartup, KPSSimStatus ) ); + User::LeaveIfError( simStatus.Get( simCStatus ) ); + simStatus.Close(); + + TParse* fp = new ( ELeave ) TParse(); + fp->Set( KProEngResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL ); + TFileName localizedFileName( fp->FullName() ); + delete fp; + + BaflUtils::NearestLanguageFile( *iFs, localizedFileName ); + RConeResourceLoader resourceLoader( *CCoeEnv::Static() ); + TRAP_IGNORE( resourceLoader.OpenL( localizedFileName ) ); + + if ( simCStatus == ESimNotPresent ) + { + // SIM card does not exist. + HBufC* infoNoteText = StringLoader::LoadLC( + R_PROFILE_TEXT_INSERT_SIM ); + CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); + note->ExecuteLD( *infoNoteText ); + CleanupStack::PopAndDestroy( infoNoteText ); + resourceLoader.Close(); + return; + } + resourceLoader.Close(); + } + + iProfileEngine->SetActiveProfileL(aId); + } // ----------------------------------------------------------------------------- // CProEngEngineImpl::ProfileLC diff -r 23553eb4e470 -r bdac6c462392 profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.h --- a/profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.h Mon Mar 15 12:41:46 2010 +0200 +++ b/profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.h Wed Mar 31 22:01:53 2010 +0300 @@ -174,6 +174,8 @@ // Own: tone handler for DRM checkups etc. CProEngToneHandler* iToneHandler; + // File server session + RFs* iFs; }; #endif // CPROENGENGINEIMPL_H diff -r 23553eb4e470 -r bdac6c462392 profilesservices/ProfileEngine/WrapperSrc/ProEngWrapper.rss --- a/profilesservices/ProfileEngine/WrapperSrc/ProEngWrapper.rss Mon Mar 15 12:41:46 2010 +0200 +++ b/profilesservices/ProfileEngine/WrapperSrc/ProEngWrapper.rss Wed Mar 31 22:01:53 2010 +0300 @@ -24,6 +24,9 @@ // INCLUDES #include #include +#include +#include +#include // CONSTANTS // MACROS @@ -47,4 +50,12 @@ // RESOURCE LBUF r_proeng_text_drm_prev_rights_set { txt = qtn_drm_prev_rights_set; } +// ----------------------------------------------------------------------------- +// +// r_profile_text_insert_sim +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_profile_text_insert_sim { buf = qtn_su_note_insert_sim; } + // End of File diff -r 23553eb4e470 -r bdac6c462392 profilesservices/ProfileEngine/group/ProfileEngine.mmp --- a/profilesservices/ProfileEngine/group/ProfileEngine.mmp Mon Mar 15 12:41:46 2010 +0200 +++ b/profilesservices/ProfileEngine/group/ProfileEngine.mmp Wed Mar 31 22:01:53 2010 +0300 @@ -75,7 +75,11 @@ LIBRARY PlatformEnv.lib // PathInfo LIBRARY ContentListingFramework.lib LIBRARY mmfcontrollerframework.lib - +LIBRARY avkon.lib +LIBRARY eikcdlg.lib +LIBRARY eikctl.lib +LIBRARY CommonEngine.lib +LIBRARY cone.lib LIBRARY DRMCommon.lib LIBRARY DrmRights.lib LIBRARY caf.lib cafutils.lib // Content access framework