profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp
changeset 64 5136fef23c4b
parent 55 4c15d9aa2384
--- a/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp	Wed Sep 29 13:58:42 2010 +0800
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp	Mon Oct 18 10:08:17 2010 +0800
@@ -1241,22 +1241,10 @@
 void CProfileEngineImpl::SetSilenceModeL( TBool aSilenceMode )
     {
     User::LeaveIfError( iCenRep->Set( KProEngSilenceMode, aSilenceMode ? 1 : 0 ) );
-    //Also set profiles' ring type to silence
-    TInt countOfProfiles = iProfileLocalisedNames->MdcaCount();
     
-    for (TInt i = 0; i < countOfProfiles; ++i) 
-        {
-        const MProfileName* profileName = iProfileLocalisedNames->ProfileName(i);
-        if (profileName) 
-            {
-            MProfileExtended2* profile = Profile2LC(profileName->Id());      
-            TProfileToneSettings setToneSettings = profile->ProfileSetTones().SetToneSettings();
-            setToneSettings.iRingingType = aSilenceMode ? EProfileRingingTypeSilent : EProfileRingingTypeRinging;
-            CommitChange2L(*profile);
-            CleanupStack::PopAndDestroy();
-            }
-        
-        }
+    //Send event through P&S
+    CreatePubSubKeysIfNeededL();
+    PublishChangeL( KProEngActiveProfileModified );
     }
 
 //  End of File