820 // then start the whole scan |
820 // then start the whole scan |
821 if ( iScanAndSaveActivated ) |
821 if ( iScanAndSaveActivated ) |
822 { |
822 { |
823 AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan ); |
823 AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan ); |
824 } |
824 } |
|
825 else |
|
826 { |
|
827 iRadioEngine.SetMuteOn( EFalse ); |
|
828 } |
825 } |
829 } |
826 else if ( iScanAndSaveActivated ) |
830 else if ( iScanAndSaveActivated ) |
827 { |
831 { |
828 // No channels found or user has canceled search before any channels are found |
832 // No channels found or user has canceled search before any channels are found |
829 if ( iRadioEngine.GetTunedFrequency() == iLowerFrequencyBound && |
833 if ( iRadioEngine.GetTunedFrequency() == iLowerFrequencyBound && |
888 iScannedChannels.Count() == 0 ) |
892 iScannedChannels.Count() == 0 ) |
889 { |
893 { |
890 restoreFrequency = ETrue; |
894 restoreFrequency = ETrue; |
891 } |
895 } |
892 UpdateToolbar(); |
896 UpdateToolbar(); |
893 RestoreRadio( restoreFrequency, EFalse ); |
897 RestoreRadio( restoreFrequency ); |
894 |
898 |
895 // update now playing index if the tuning is triggered from accessory |
899 // update now playing index if the tuning is triggered from accessory |
896 TInt frequencyIndex = FrequencyIndex( tunedFrequency ); |
900 TInt frequencyIndex = FrequencyIndex( tunedFrequency ); |
897 |
901 |
898 if ( frequencyIndex != KErrNotFound ) |
902 if ( frequencyIndex != KErrNotFound ) |
910 // ----------------------------------------------------------------------------------------------- |
914 // ----------------------------------------------------------------------------------------------- |
911 // CFMRadioScanLocalStationsView::RestoreRadio |
915 // CFMRadioScanLocalStationsView::RestoreRadio |
912 // Restores the radio after scanning |
916 // Restores the radio after scanning |
913 // ----------------------------------------------------------------------------------------------- |
917 // ----------------------------------------------------------------------------------------------- |
914 // |
918 // |
915 void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency, TBool aUnmute ) |
919 void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency ) |
916 { |
920 { |
917 FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::RestoreRadio") ) ); |
921 FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::RestoreRadio") ) ); |
918 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
922 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
919 // if iInitialTunedFrequency is 0, radio has already been restored |
923 // if iInitialTunedFrequency is 0, radio has already been restored |
920 if ( iInitialTunedFrequency ) |
924 if ( iInitialTunedFrequency ) |
921 { |
925 { |
922 if ( aTuneInitialFrequency ) |
926 if ( aTuneInitialFrequency ) |
923 { |
927 { |
924 iTuneRequested = ETrue; |
928 iTuneRequested = ETrue; |
925 iRadioEngine.Tune( iInitialTunedFrequency ); |
929 iRadioEngine.Tune( iInitialTunedFrequency ); |
926 } |
|
927 if ( aUnmute ) // set mute off by default |
|
928 { |
|
929 iRadioEngine.SetMuteOn( EFalse ); |
|
930 } |
930 } |
931 iInitialTunedFrequency = 0; |
931 iInitialTunedFrequency = 0; |
932 } |
932 } |
933 appUi->SetStartupWizardRunning( EFalse ); |
933 appUi->SetStartupWizardRunning( EFalse ); |
934 } |
934 } |
989 { |
989 { |
990 iContainer->UpdateLastListenedChannel( 0 ); // select the first channel |
990 iContainer->UpdateLastListenedChannel( 0 ); // select the first channel |
991 PlayCurrentlySelectedChannelL(); |
991 PlayCurrentlySelectedChannelL(); |
992 iContainer->DrawDeferred(); |
992 iContainer->DrawDeferred(); |
993 } |
993 } |
994 |
994 |
995 //unmute radio |
|
996 iRadioEngine.SetMuteOn( EFalse ); |
|
997 |
|
998 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
995 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
999 |
996 |
1000 if ( appUi->IsStartupWizardRunning() ) |
997 if ( appUi->IsStartupWizardRunning() ) |
1001 { |
998 { |
1002 appUi->SetStartupWizardRunning( EFalse ); |
999 appUi->SetStartupWizardRunning( EFalse ); |