125 iModel.DataStore()->SetRingingType( static_cast<TProfileRingingType>( ringingType ) ); |
125 iModel.DataStore()->SetRingingType( static_cast<TProfileRingingType>( ringingType ) ); |
126 iModel.DataStore()->SetRingingVolume( toneSettings.iRingingVolume ); |
126 iModel.DataStore()->SetRingingVolume( toneSettings.iRingingVolume ); |
127 iModel.DataStore()->SetTextToSpeech( toneSettings.iTextToSpeech ); |
127 iModel.DataStore()->SetTextToSpeech( toneSettings.iTextToSpeech ); |
128 |
128 |
129 TProfileKeypadVolume keypadVolume = toneSettings.iKeypadVolume; |
129 TProfileKeypadVolume keypadVolume = toneSettings.iKeypadVolume; |
130 |
130 |
131 if ( keypadVolume < EProfileKeypadVolumeOff |
131 if ( keypadVolume < EProfileKeypadVolumeOff |
132 || keypadVolume > EProfileKeypadVolumeLevel3 ) |
132 || keypadVolume > EProfileKeypadVolumeLevel3 ) |
133 { |
133 { |
134 // Value is out of range - use default |
134 // Value is out of range - use default |
135 keypadVolume = EProfileKeypadVolumeLevel2; // default value |
135 keypadVolume = EProfileKeypadVolumeLevel2; // default value |
136 } |
136 } |
137 |
137 |
138 const TInt KKeypadVolume[4] = {0, 2, 5, 10}; // Previous PE settings |
138 const TInt KKeypadVolume[4] = {0, 2, 5, 10}; // Previous PE settings |
139 TInt volume = KKeypadVolume[ keypadVolume ]; |
139 TInt volume = KKeypadVolume[ keypadVolume ]; |
140 iModel.DataStore()->SetKeypadVolume( volume ); |
140 iModel.DataStore()->SetKeypadVolume( volume ); |
141 |
141 |
142 // Get alert for group Ids |
142 // Get alert for group Ids |
143 iModel.DataStore()->SetAlertForGroup( activeProfile->AlertForL() ); |
143 iModel.DataStore()->SetAlertForGroup( activeProfile->AlertForL() ); |
144 |
144 |
145 // Pop( activeProfile ) does not recognize ActiveProfileLC created |
145 // Pop( activeProfile ) does not recognize ActiveProfileLC created |
146 // item because of casting. However, functionality and cleanup works OK. |
146 // item because of casting. However, functionality and cleanup works OK. |
147 CleanupStack::Pop(); // activeProfile |
147 CleanupStack::Pop(); // activeProfile |
148 activeProfile->Release(); |
148 activeProfile->Release(); |
149 __UHEAP_MARKEND; |
149 __UHEAP_MARKEND; |
150 } |
150 } |
151 |
151 |
152 // ----------------------------------------------------------------------------- |
152 // ----------------------------------------------------------------------------- |
153 // CPEProfileSettingMonitor::HandleActiveProfileEventL |
153 // CPEProfileSettingMonitor::HandleActiveProfileEventL |
154 // Callback function - implements virtual function from MProfileChangeObserver |
154 // Callback function - implements virtual function from MProfileChangeObserver |