photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp
branchRCL_3
changeset 9 6b87b143d312
parent 0 4e91876724a2
child 13 71da52165949
child 16 0bc0ea26031e
--- a/photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp	Tue Feb 02 10:12:14 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp	Fri Feb 19 22:51:01 2010 +0200
@@ -28,6 +28,9 @@
 namespace
 	{
 	const TInt KMicroSecondsInASecond = 1000000;
+    
+	// @ref: Minimum slideshow transition delay
+	const TInt KMinTimeoutDelay = 2; // secs 
 	}
 
 // -----------------------------------------------------------------------------
@@ -95,6 +98,13 @@
     
     // Take the smaller of the two timeout values
     iSettingsDelay = Min( iSettingsDelay, screenSaverTimeout );
+    
+    // Set the timeout delay to minimum value as it can not be zero!
+    if (iSettingsDelay == 0)
+        {
+        iSettingsDelay = KMinTimeoutDelay;
+        }
+    
     // Convert the value to microseconds
     iSettingsDelay *= KMicroSecondsInASecond;
     // Halve the value to ensure out timer kicks beforehand
@@ -110,8 +120,7 @@
 //
 TInt CShwSlideshowBackLightTimer::Tick()
     {
-	// Timer must be reset to prevent screen saver to appear in 
-	// Aalto when the slide is closed. Should not cause any side effects.
+	// Timer must be reset to prevent screen saver to appear
 	User::ResetInactivityTime();
 	iStartTime.HomeTime();