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> |
|
30 |
29 |
31 #include "NcnDebug.h" |
30 #include "NcnDebug.h" |
32 #include "NcnCRHandler.h" |
31 #include "NcnCRHandler.h" |
33 #include "CVoiceMailManager.h" |
32 #include "CVoiceMailManager.h" |
34 #include "CNcnNotifier.h" |
33 #include "CNcnNotifier.h" |
75 NCN_RDEBUG( _L("CVoiceMailManager : Constructing") ); |
74 NCN_RDEBUG( _L("CVoiceMailManager : Constructing") ); |
76 |
75 |
77 //Clear soft notifications that might be drawn automatically by avkon |
76 //Clear soft notifications that might be drawn automatically by avkon |
78 //TSW Error TWOK-6PNT26 |
77 //TSW Error TWOK-6PNT26 |
79 ClearVoiceMailSoftNotes(); |
78 ClearVoiceMailSoftNotes(); |
80 //clear Voicemail indicators only when KMuiuSupressAllNotificationConfiguration(VVM) is enabled. |
79 |
81 if(CheckSupressNotificationSettingL()) |
|
82 { |
|
83 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, EFalse ); |
|
84 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, EFalse ); |
|
85 } |
|
86 //Get SIM change status at the startup. If the SIM will change after |
80 //Get SIM change status at the startup. If the SIM will change after |
87 //boot-up we get notifed by the Model so no need to subscribe for this key |
81 //boot-up we get notifed by the Model so no need to subscribe for this key |
88 //TSW ID EHCN-6NRAZE |
82 //TSW ID EHCN-6NRAZE |
89 TInt simValue = 0; |
83 TInt simValue = 0; |
90 TInt status = RProperty::Get( KPSUidStartup, KPSSimChanged, simValue ); |
84 TInt status = RProperty::Get( KPSUidStartup, KPSSimChanged, simValue ); |
183 { |
177 { |
184 //Soft notifications |
178 //Soft notifications |
185 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS supported)"), aVoiceMailsInLine1 ); |
179 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS supported)"), aVoiceMailsInLine1 ); |
186 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 2 (ALS supported)"), aVoiceMailsInLine2 ); |
180 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 2 (ALS supported)"), aVoiceMailsInLine2 ); |
187 |
181 |
188 if(!CheckSupressNotificationSettingL()) |
182 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 ); |
189 { |
183 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 ); |
190 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 ); |
184 |
191 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 ); |
185 // Indications |
192 NCN_RDEBUG( _L("CVoiceMailManager: UpdateNoteAndIndicationWithALS With VVM off") ); |
186 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
193 // Indications |
187 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse ); |
194 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
188 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse ); |
195 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse ); |
|
196 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse ); |
|
197 } |
|
198 } |
189 } |
199 |
190 |
200 // --------------------------------------------------------- |
191 // --------------------------------------------------------- |
201 // Update soft notification and trigger icon drawing to |
192 // Update soft notification and trigger icon drawing to |
202 // reflect the current state of the lines |
193 // reflect the current state of the lines |
250 if( iIsALSSupported == EFalse && |
241 if( iIsALSSupported == EFalse && |
251 voiceMailsInLine1 > 0) |
242 voiceMailsInLine1 > 0) |
252 { |
243 { |
253 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS not supported)"), voiceMailsInLine1 ); |
244 NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS not supported)"), voiceMailsInLine1 ); |
254 |
245 |
255 if(!CheckSupressNotificationSettingL()) |
246 //Soft notification. The SN must not contain any reference to line numbers |
256 { |
247 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 ); |
257 NCN_RDEBUG( _L("CVoiceMailManager:SetIndicator and Notification ALS not supported With VVM off") ); |
248 |
258 //Soft notification. The SN must not contain any reference to line numbers |
249 // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported |
259 iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 ); |
250 // ENcnIndicatorVMLine1 is mapped to KDisplayVoicemailActive in CNcnMsgWaitingManager |
260 |
251 iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, ETrue ); |
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 } |
|
265 } |
252 } |
266 else if( iIsALSSupported == TRUE ) |
253 else if( iIsALSSupported == TRUE ) |
267 { |
254 { |
268 UpdateNoteAndIndicationWithALS( voiceMailsInLine1, voiceMailsInLine2 ); |
255 UpdateNoteAndIndicationWithALS( voiceMailsInLine1, voiceMailsInLine2 ); |
269 } |
256 } |
326 { |
313 { |
327 NCN_RDEBUG_INT2( _L("ALS value NOT read properly! Status: %d Value: %d"), status, alsValue ); |
314 NCN_RDEBUG_INT2( _L("ALS value NOT read properly! Status: %d Value: %d"), status, alsValue ); |
328 return EFalse; |
315 return EFalse; |
329 } |
316 } |
330 } |
317 } |
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 } |
|
357 // End of File |
318 // End of File |