--- a/phoneengine/phonemodel/src/cpeprofilesettingmonitor.cpp Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneengine/phonemodel/src/cpeprofilesettingmonitor.cpp Wed Sep 01 12:30:10 2010 +0100
@@ -23,7 +23,6 @@
#include <mpedatastore.h>
#include <MProfileExtraTones.h>
#include <talogger.h>
-#include <ProfileEngineInternalCRKeys.h>
/////////////////////////////////////////////////////////////////////////
@@ -64,8 +63,7 @@
//
CPEProfileSettingMonitor::CPEProfileSettingMonitor(
MPEPhoneModelInternal& aModel
- ) : CPECenRepMonitor( KProEngSilenceMode ),
- iModel( aModel )
+ ) : iModel( aModel )
{
}
@@ -80,8 +78,7 @@
iProfileEngine = CreateProfileEngineL();
// Retrieve current profile settings
-
- BaseConstructL( KCRUidProfileEngine );
+ GetProfileSettingsL();
iModel.SendMessage( MEngineMonitor::EPEMessageProfileChanged );
@@ -124,33 +121,23 @@
const TProfileToneSettings& toneSettings = activeTones.ToneSettings();
// Get ringing type and volume and keypad volume
- TProfileRingingType ringingType = toneSettings.iRingingType;
-
- TInt silentVolume(0);
- if ( KErrNone == Get(silentVolume) && silentVolume )
- {
- iModel.DataStore()->SetRingingType(EProfileRingingTypeSilent);
- }
- else
- {
- iModel.DataStore()->SetRingingType( static_cast<TProfileRingingType>( ringingType ) );
- }
-
+ TProfileRingingType ringingType = toneSettings.iRingingType;
+ iModel.DataStore()->SetRingingType( static_cast<TProfileRingingType>( ringingType ) );
iModel.DataStore()->SetRingingVolume( toneSettings.iRingingVolume );
iModel.DataStore()->SetTextToSpeech( toneSettings.iTextToSpeech );
TProfileKeypadVolume keypadVolume = toneSettings.iKeypadVolume;
-
+
if ( keypadVolume < EProfileKeypadVolumeOff
|| keypadVolume > EProfileKeypadVolumeLevel3 )
- {
+ {
// Value is out of range - use default
- keypadVolume = EProfileKeypadVolumeLevel2; // default value
- }
-
- const TInt KKeypadVolume[4] = {0, 2, 5, 10}; // Previous PE settings
- TInt volume = KKeypadVolume[ keypadVolume ];
- iModel.DataStore()->SetKeypadVolume( volume );
+ keypadVolume = EProfileKeypadVolumeLevel2; // default value
+ }
+
+ const TInt KKeypadVolume[4] = {0, 2, 5, 10}; // Previous PE settings
+ TInt volume = KKeypadVolume[ keypadVolume ];
+ iModel.DataStore()->SetKeypadVolume( volume );
// Get alert for group Ids
iModel.DataStore()->SetAlertForGroup( activeProfile->AlertForL() );
@@ -158,21 +145,8 @@
// Pop( activeProfile ) does not recognize ActiveProfileLC created
// item because of casting. However, functionality and cleanup works OK.
CleanupStack::Pop(); // activeProfile
- activeProfile->Release();
- __UHEAP_MARKEND;
- }
-
-// -----------------------------------------------------------------------------
-// CPEProfileSettingMonitor::UpdateL
-// Callback function - implements virtual function from CPECenRepMonitor
-// This is called whenever cr settings change
-// -----------------------------------------------------------------------------
-//
-void CPEProfileSettingMonitor::UpdateL()
- {
- TEFLOGSTRING( KTAINT, "PE CPEProfileSettingMonitor::UpdateL" );
- GetProfileSettingsL();
- iModel.SendMessage( MEngineMonitor::EPEMessageProfileChanged );
+ activeProfile->Release();
+ __UHEAP_MARKEND;
}
// -----------------------------------------------------------------------------