24 #include <messagingvariant.hrh> // For CR key handling local variation flags |
24 #include <messagingvariant.hrh> // For CR key handling local variation flags |
25 #include <centralrepository.h> // For CR key handling |
25 #include <centralrepository.h> // For CR key handling |
26 #include <NcnListInternalCRKeys.h> // For CR key handling |
26 #include <NcnListInternalCRKeys.h> // For CR key handling |
27 #include <RSSSettings.h> // For ALS detection |
27 #include <RSSSettings.h> // For ALS detection |
28 #include <startupdomainpskeys.h> |
28 #include <startupdomainpskeys.h> |
|
29 #include <MessagingDomainCRKeys.h> |
29 |
30 |
30 #include "NcnDebug.h" |
31 #include "NcnDebug.h" |
31 #include "NcnCRHandler.h" |
32 #include "NcnCRHandler.h" |
32 #include "CVoiceMailManager.h" |
33 #include "CVoiceMailManager.h" |
33 #include "CNcnNotifier.h" |
34 #include "CNcnNotifier.h" |
74 NCN_RDEBUG( _L("CVoiceMailManager : Constructing") ); |
75 NCN_RDEBUG( _L("CVoiceMailManager : Constructing") ); |
75 |
76 |
76 //Clear soft notifications that might be drawn automatically by avkon |
77 //Clear soft notifications that might be drawn automatically by avkon |
77 //TSW Error TWOK-6PNT26 |
78 //TSW Error TWOK-6PNT26 |
78 ClearVoiceMailSoftNotes(); |
79 ClearVoiceMailSoftNotes(); |
79 |
80 //clear Voicemail indicators only when KMuiuSupressAllNotificationConfiguration(VVM) is enabled. |
|
81 if(CheckSupressNotificationSettingL()) |
|
82 { |
|
83 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, EFalse ); |
|
84 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, EFalse ); |
|
85 } |
80 //Get SIM change status at the startup. If the SIM will change after |
86 //Get SIM change status at the startup. If the SIM will change after |
81 //boot-up we get notifed by the Model so no need to subscribe for this key |
87 //boot-up we get notifed by the Model so no need to subscribe for this key |
82 //TSW ID EHCN-6NRAZE |
88 //TSW ID EHCN-6NRAZE |
83 TInt simValue = 0; |
89 TInt simValue = 0; |
84 TInt status = RProperty::Get( KPSUidStartup, KPSSimChanged, simValue ); |
90 TInt status = RProperty::Get( KPSUidStartup, KPSSimChanged, simValue ); |
177 { |
183 { |
178 //Soft notifications |
184 //Soft notifications |
179 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS supported)"), aVoiceMailsInLine1 ); |
185 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS supported)"), aVoiceMailsInLine1 ); |
180 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 2 (ALS supported)"), aVoiceMailsInLine2 ); |
186 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 2 (ALS supported)"), aVoiceMailsInLine2 ); |
181 |
187 |
182 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 ); |
188 if(!CheckSupressNotificationSettingL()) |
183 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 ); |
189 { |
184 |
190 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 ); |
185 // Indications |
191 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 ); |
186 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
192 NCN_RDEBUG( _L("CVoiceMailManager: UpdateNoteAndIndicationWithALS With VVM off") ); |
187 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse ); |
193 // Indications |
188 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse ); |
194 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
|
195 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse ); |
|
196 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse ); |
|
197 } |
189 } |
198 } |
190 |
199 |
191 // --------------------------------------------------------- |
200 // --------------------------------------------------------- |
192 // Update soft notification and trigger icon drawing to |
201 // Update soft notification and trigger icon drawing to |
193 // reflect the current state of the lines |
202 // reflect the current state of the lines |
241 if( iIsALSSupported == EFalse && |
250 if( iIsALSSupported == EFalse && |
242 voiceMailsInLine1 > 0) |
251 voiceMailsInLine1 > 0) |
243 { |
252 { |
244 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS not supported)"), voiceMailsInLine1 ); |
253 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS not supported)"), voiceMailsInLine1 ); |
245 |
254 |
246 //Soft notification. The SN must not contain any reference to line numbers |
255 if(!CheckSupressNotificationSettingL()) |
247 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 ); |
256 { |
248 |
257 NCN_RDEBUG( _L("CVoiceMailManager:SetIndicator and Notification ALS not supported With VVM off") ); |
249 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
258 //Soft notification. The SN must not contain any reference to line numbers |
250 // ENcnIndicatorVMLine1 is mapped to KDisplayVoicemailActive in CNcnMsgWaitingManager |
259 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 ); |
251 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, ETrue ); |
260 |
|
261 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
|
262 // ENcnIndicatorVMLine1 is mapped to KDisplayVoicemailActive in CNcnMsgWaitingManager |
|
263 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, ETrue ); |
|
264 } |
252 } |
265 } |
253 else if( iIsALSSupported == TRUE ) |
266 else if( iIsALSSupported == TRUE ) |
254 { |
267 { |
255 UpdateNoteAndIndicationWithALS( voiceMailsInLine1, voiceMailsInLine2 ); |
268 UpdateNoteAndIndicationWithALS( voiceMailsInLine1, voiceMailsInLine2 ); |
256 } |
269 } |
313 { |
326 { |
314 NCN_RDEBUG_INT2( _L("ALS value NOT read properly! Status: %d Value: %d"), status, alsValue ); |
327 NCN_RDEBUG_INT2( _L("ALS value NOT read properly! Status: %d Value: %d"), status, alsValue ); |
315 return EFalse; |
328 return EFalse; |
316 } |
329 } |
317 } |
330 } |
|
331 |
|
332 // ------------------------------------------------------------------- |
|
333 // Check the KMuiuSupressAllNotificationConfiguration value |
|
334 // ------------------------------------------------------------------- |
|
335 // |
|
336 TBool CVoiceMailManager::CheckSupressNotificationSettingL() |
|
337 { |
|
338 TBool result = EFalse; |
|
339 TInt value = 0; |
|
340 CRepository* repository = NULL; |
|
341 |
|
342 TRAPD( err, repository = CRepository::NewL( KCRUidMuiuMessagingConfiguration ) ); |
|
343 if( err == KErrNone && repository != NULL ) |
|
344 { |
|
345 CleanupStack::PushL( repository ); |
|
346 err = repository->Get( KMuiuSupressAllNotificationConfiguration, value ); |
|
347 |
|
348 if(err == KErrNone && (value & KMuiuNotificationSupressedForVoiceMail )) |
|
349 { |
|
350 result = ETrue; |
|
351 } |
|
352 } |
|
353 NCN_RDEBUG_INT( _L("CNcnNotifier::CheckSupressNotificationSetting() - result: %d"), result ); |
|
354 CleanupStack::PopAndDestroy( repository ); |
|
355 return result; |
|
356 } |
318 // End of File |
357 // End of File |