fmradio/fmradio/src/fmradioscanlocalstationsview.cpp
branchRCL_3
changeset 11 97dcae98e602
parent 7 95ac6b0f7f5b
child 15 04aa446da81c
--- a/fmradio/fmradio/src/fmradioscanlocalstationsview.cpp	Tue Apr 27 16:38:14 2010 +0300
+++ b/fmradio/fmradio/src/fmradioscanlocalstationsview.cpp	Tue May 11 16:13:56 2010 +0300
@@ -822,6 +822,10 @@
             {
             AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan );
             }
+        else
+            {
+            iRadioEngine.SetMuteOn( EFalse );
+            }
         }
     else if ( iScanAndSaveActivated )
         {
@@ -846,7 +850,7 @@
                 iScanAndSaveActivated = EFalse;
 
                 RemoveScanningInProgressNoteL();
-                RestoreRadio( EFalse );
+                RestoreRadio();
                 appUi->AutoTuneInMainView(ETrue);
                 
                 ActivateMainViewL();
@@ -890,7 +894,7 @@
             restoreFrequency = ETrue;
             }
         UpdateToolbar();
-        RestoreRadio( restoreFrequency, EFalse );
+        RestoreRadio( restoreFrequency );
         
         // update now playing index if the tuning is triggered from accessory 
         TInt frequencyIndex = FrequencyIndex( tunedFrequency );
@@ -912,7 +916,7 @@
 // Restores the radio after scanning
 // -----------------------------------------------------------------------------------------------
 //
-void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency, TBool aUnmute )
+void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency )
     {
     FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::RestoreRadio") ) );
     CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
@@ -924,10 +928,6 @@
             iTuneRequested = ETrue;
             iRadioEngine.Tune( iInitialTunedFrequency );
             }
-        if ( aUnmute ) // set mute off by default
-            {
-            iRadioEngine.SetMuteOn( EFalse );
-            }
         iInitialTunedFrequency = 0;
         }
     appUi->SetStartupWizardRunning( EFalse );
@@ -991,10 +991,7 @@
             PlayCurrentlySelectedChannelL();
             iContainer->DrawDeferred();
             }
-
-        //unmute radio
-        iRadioEngine.SetMuteOn( EFalse );
-
+        
         CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
 
         if ( appUi->IsStartupWizardRunning() )
@@ -1239,6 +1236,7 @@
             {
             SetNowPlayingChannelL( selectedChannel );
             SetLastListenedChannel( selectedChannel );
+            iRadioEngine.SetMuteOn( EFalse );
             }
         }
     }