52 #include <tzlocalizationdatatypes.h> |
52 #include <tzlocalizationdatatypes.h> |
53 #include <data_caging_path_literals.hrh> |
53 #include <data_caging_path_literals.hrh> |
54 #include <ProfileEngineDomainConstants.h> |
54 #include <ProfileEngineDomainConstants.h> |
55 #include <clock.rsg> |
55 #include <clock.rsg> |
56 #include <AknGlobalNote.h> |
56 #include <AknGlobalNote.h> |
|
57 #include <featdiscovery.h> |
|
58 #include <ProfileEngineDomainCRKeys.h> |
57 |
59 |
58 // User Includes |
60 // User Includes |
59 #include "clkuiclksrvmodel.h" |
61 #include "clkuiclksrvmodel.h" |
60 #include "clkuialarmmodel.h" |
62 #include "clkuialarmmodel.h" |
61 #include "clkdatetimeviewcontainer.h" |
63 #include "clkdatetimeviewcontainer.h" |
2446 alarmToneList->InsertNullItemL( iDefaultToneTxt->Des(), iDefaultAlarmToneName ); |
2448 alarmToneList->InsertNullItemL( iDefaultToneTxt->Des(), iDefaultAlarmToneName ); |
2447 alarmToneList->InsertEndNullItemL( iSoundOffTxt->Des(), iExtension->GetSilentToneStr()->Des() ); |
2449 alarmToneList->InsertEndNullItemL( iSoundOffTxt->Des(), iExtension->GetSilentToneStr()->Des() ); |
2448 // Do not show videos. |
2450 // Do not show videos. |
2449 alarmToneList->AddExclusiveMediaTypeL( ECLFMediaTypeVideo ); |
2451 alarmToneList->AddExclusiveMediaTypeL( ECLFMediaTypeVideo ); |
2450 alarmToneList->SetAutomatedType( CDRMHelper::EAutomatedTypeClockAlarm ); |
2452 alarmToneList->SetAutomatedType( CDRMHelper::EAutomatedTypeClockAlarm ); |
2451 |
2453 // Do not show items over the file size limit, if configured. |
|
2454 if ( CFeatureDiscovery::IsFeatureSupportedL( |
|
2455 KFeatureIdFfLimitedMessageAndAlarmToneSize ) ) |
|
2456 { |
|
2457 // Max file size allowed (in KB). 0 == no limit. |
|
2458 TInt fileSizeLimit = 0; |
|
2459 CRepository* profilesCenRep = CRepository::NewLC( KCRUidProfileEngine ); |
|
2460 |
|
2461 // Reading the repository should not fail, but if it does, the default |
|
2462 // value we have for the file size limit is acceptable. |
|
2463 profilesCenRep->Get( KProEngRingingToneMaxSize, fileSizeLimit ); // codescanner::crepository |
|
2464 CleanupStack::PopAndDestroy( profilesCenRep ); |
|
2465 |
|
2466 if ( fileSizeLimit > 0 ) |
|
2467 { |
|
2468 alarmToneList->SetMaxFileSize( fileSizeLimit * KKilo ); |
|
2469 } |
|
2470 } |
2452 // Launch the list. ETrue is returned if OK is pressed. EFalse otherwise. |
2471 // Launch the list. ETrue is returned if OK is pressed. EFalse otherwise. |
2453 if( alarmToneList->LaunchL( iAlarmToneName, *iToneListHeader ) ) |
2472 if( alarmToneList->LaunchL( iAlarmToneName, *iToneListHeader ) ) |
2454 { |
2473 { |
2455 // User has selected the tone and pressed OK. |
2474 // User has selected the tone and pressed OK. |
2456 // Holder for the old alarm tone. |
2475 // Holder for the old alarm tone. |