fmradio/fmradio/src/fmradioappui.cpp
branchRCL_3
changeset 5 108d9820af01
parent 3 42dc287846be
child 6 3cb097cb90f8
--- a/fmradio/fmradio/src/fmradioappui.cpp	Fri Feb 19 22:51:16 2010 +0200
+++ b/fmradio/fmradio/src/fmradioappui.cpp	Fri Mar 12 15:42:47 2010 +0200
@@ -108,8 +108,9 @@
     iStartupWizardRunning = EFalse;
     iTuneFromWizardActivated = EFalse;
     iInfoNoteOn = EFalse;
-  	iAutoTune = EFalse;
-   	iAutoTuneUnmute = EFalse;
+    iAutoTune = EFalse;
+    iAutoTuneUnmute = EFalse;
+    iRegionChanged = EFalse;
 
    	BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
     FeatureManager::InitializeLibL();
@@ -2186,10 +2187,11 @@
                 // Show note only if the region has changed from a concrete 
                 // one to another concrete one. EFMRadioRegionNone is not 
                 // a concrete one (first startup case) -- don't show note.
+                iRegionChanged = ETrue;
                 HBufC* bandSetText = StringLoader::LoadLC( R_QTN_FMRADIO_CONF_FREQ_BAND_SET_AUTOM, iCoeEnv );
-			    CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );			    
-			    note->ExecuteLD( *bandSetText );
-			    CleanupStack::PopAndDestroy( bandSetText );
+                CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );			    
+                note->ExecuteLD( *bandSetText );
+                CleanupStack::PopAndDestroy( bandSetText );
                 }
             }
         }
@@ -2253,7 +2255,7 @@
 void CFMRadioAppUi::HandleStartupWizardL()
     {
     FTRACE( FPrint( _L("CFMRadioAppUi::HandleStartupWizardL()")) );
-    if ( !IsStartupWizardHandled() )
+    if ( !IsStartupWizardHandled() || iRegionChanged )
         {
         // Call to iRadioEngine->UpdatedStartupCount()
         // increases startup count by one and returns amount of app startups.
@@ -2264,6 +2266,13 @@
             SetStartupWizardRunning( ETrue );
             ActivateLocalViewL( iScanLocalStationsView->Id() );
             }
+        else if ( iRegionChanged ) //force rescan
+            {
+            iRegionChanged = EFalse;
+            UpdateChannelsL( ERemoveAllFromRepository, 0, 0 );
+            SetStartupWizardRunning( ETrue );
+            ActivateLocalViewL( iScanLocalStationsView->Id() );
+            }
         else // check IAD update here
             {
             HandleIADUpdateCheckL();