photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp
branchRCL_3
changeset 11 71da52165949
parent 9 6b87b143d312
child 13 bcb43dc84c44
equal deleted inserted replaced
9:6b87b143d312 11:71da52165949
    81 void CShwSlideshowBackLightTimer::ConstructL()
    81 void CShwSlideshowBackLightTimer::ConstructL()
    82 	{
    82 	{
    83 	TRACER("CShwSlideshowBackLightTimer::ConstructL");
    83 	TRACER("CShwSlideshowBackLightTimer::ConstructL");
    84 	GLX_LOG_ENTRY_EXIT("CShwSlideshowBackLightTimer::ConstructL");
    84 	GLX_LOG_ENTRY_EXIT("CShwSlideshowBackLightTimer::ConstructL");
    85 	
    85 	
    86     CRepository* repository = CRepository::NewLC( KCRUidPeripheralSettings );
    86     CRepository* lightsRepo = CRepository::NewLC( KCRUidPeripheralSettings );
    87     // What's the timeout value (in seconds ) for the display light?
    87     // What's the timeout value (in seconds ) for the display light?
    88     repository->Get( KSettingsDisplayLightsTimeout, iSettingsDelay );
    88     lightsRepo->Get( KSettingsDisplayLightsTimeout, iSettingsDelay );
    89     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, lights timeout = %d",
    89     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, lights timeout = %d",
    90         iSettingsDelay );
    90         iSettingsDelay );
       
    91     CleanupStack::PopAndDestroy( lightsRepo );
    91     
    92     
       
    93     CRepository* scrSaverRepo = CRepository::NewLC( KCRUidPersonalizationSettings );
    92     // What's the screen saver's timeout value (in seconds)?
    94     // What's the screen saver's timeout value (in seconds)?
    93     TInt screenSaverTimeout = 0;
    95     TInt screenSaverTimeout = 0;
    94     repository->Get( KSettingsScreenSaverPeriod, screenSaverTimeout );
    96     scrSaverRepo->Get( KSettingsScreenSaverPeriod, screenSaverTimeout );
    95     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, scr saver timeout = %d",
    97     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, scr saver timeout = %d",
    96         screenSaverTimeout );
    98         screenSaverTimeout );
    97     CleanupStack::PopAndDestroy( repository );
    99     CleanupStack::PopAndDestroy( scrSaverRepo );
    98     
   100     
    99     // Take the smaller of the two timeout values
   101     // Take the smaller of the two timeout values
   100     iSettingsDelay = Min( iSettingsDelay, screenSaverTimeout );
   102     iSettingsDelay = Min( iSettingsDelay, screenSaverTimeout );
   101     
   103     
   102     // Set the timeout delay to minimum value as it can not be zero!
   104     // Set the timeout delay to minimum value as it can not be zero!