clock2/clockui/adtupdater/src/adtupdatercontainer.cpp
branchRCL_3
changeset 19 1984aceb8774
parent 0 f979ecb2b13e
child 21 9711e452b5e9
--- a/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp	Mon Mar 15 12:40:18 2010 +0200
+++ b/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp	Wed Mar 31 21:29:10 2010 +0300
@@ -294,7 +294,7 @@
 	{
 	__PRINTS( "CAdtUpdaterContainer::InformAboutNwUpdate - Entry" );
 
-	if( IsFirstBoot() &&  IsSimPresent() && IsNitzPluginActive() )
+	if( IsFirstBoot() &&  IsSimPresent() && IsNitzPluginActive() && PredictiveTimeEnabled())
 		{
 		__PRINTS( "First boot, sim is present and auto time update is ON" );
 		
@@ -315,7 +315,7 @@
 		// Start the timer	
 		iPeriodic->Start( KTimeout, KInterval, timerCallBack );
 		}
-	else if( IsFirstBoot() )
+	else if( IsFirstBoot()&& PredictiveTimeEnabled() )
 		{	
 		__PRINTS( "First boot, normal boot sequence" );
 		
@@ -327,7 +327,7 @@
 		// Exit the application.
 		iAdtUpdaterAppUi->Exit();
 		}
-	else if( !RTCStatus() && !HiddenReset() )
+	else if( !RTCStatus() && !HiddenReset() && PredictiveTimeEnabled())
 		{
 		__PRINTS( "RTC invalid or Hidden Reset" );
 		
@@ -1535,4 +1535,25 @@
     
     return TBool( showQueries ); 
     }
+
+// ---------------------------------------------------------------------------
+// CAdtUpdaterContainer::PredictiveTimeEnabled()
+// Rest of the details are commented in headers.
+// ---------------------------------------------------------------------------
+TBool CAdtUpdaterContainer::PredictiveTimeEnabled()
+     {
+     TInt value( EPredictiveTimeEnabled );
+     CRepository* repository(NULL);
+     
+     TRAPD( err, repository = CRepository::NewL( KCRUidStartupConf ) );
+
+     if ( err == KErrNone )
+         {
+         err = repository->Get( KPredictiveTimeAndCountrySelection, value );
+         }
+     delete repository;
+ 
+     return value;
+     } 
+
 // End of file