--- a/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp Thu Sep 02 20:42:34 2010 +0300
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp Fri Sep 17 08:31:27 2010 +0300
@@ -1241,10 +1241,22 @@
void CProfileEngineImpl::SetSilenceModeL( TBool aSilenceMode )
{
User::LeaveIfError( iCenRep->Set( KProEngSilenceMode, aSilenceMode ? 1 : 0 ) );
+ //Also set profiles' ring type to silence
+ TInt countOfProfiles = iProfileLocalisedNames->MdcaCount();
- //Send event through P&S
- CreatePubSubKeysIfNeededL();
- PublishChangeL( KProEngActiveProfileModified );
+ 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();
+ }
+
+ }
}
// End of File