# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1270060292 -10800 # Node ID 95ac6b0f7f5b5c65f04513807f7d9fb2b751a879 # Parent 3cb097cb90f8b38b0c0b9d23a0eb767247b42373 Revision: 201011 Kit: 201013 diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/conf/fmradio.confml Binary file fmradio/conf/fmradio.confml has changed diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/inc/fmradiomusicstorehandler.h --- a/fmradio/fmradio/inc/fmradiomusicstorehandler.h Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/inc/fmradiomusicstorehandler.h Wed Mar 31 21:31:32 2010 +0300 @@ -193,7 +193,7 @@ * @param aSongName Name of the single * @returns search string and pushes it to cleanup stack. */ - HBufC* NokiaMusicShopSearchLC( const TDesC& aSongName, + HBufC* NokiaMusicShopSearchL( const TDesC& aSongName, const TDesC& aArtistName, const TDesC& aAlbumName ); diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/inc/fmradioscanlocalstationsview.h --- a/fmradio/fmradio/inc/fmradioscanlocalstationsview.h Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/inc/fmradioscanlocalstationsview.h Wed Mar 31 21:31:32 2010 +0300 @@ -165,7 +165,7 @@ /** * Restores the radio after scanning */ - void RestoreRadio( TBool aTuneInitialFrequency = ETrue ); + void RestoreRadio( TBool aTuneInitialFrequency = ETrue, TBool aUnmute = ETrue ); /** * Called when a new scan is activated. */ diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/src/fmradioappui.cpp --- a/fmradio/fmradio/src/fmradioappui.cpp Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/src/fmradioappui.cpp Wed Mar 31 21:31:32 2010 +0300 @@ -875,7 +875,7 @@ // void CFMRadioAppUi::DisplayInformationNoteL( TInt aInfoNote ) { - if ( !iInfoNoteOn ) + if ( !iInfoNoteOn && IsForeground() ) { CFMInformationNote* infonote = new ( ELeave ) CFMInformationNote( *this ); HBufC* noteText = StringLoader::LoadLC( aInfoNote, iCoeEnv ); @@ -2017,27 +2017,24 @@ { FTRACE( FPrint( _L("CFMRadioAppUi::HandleFMTransmitterOnCallbackL()") ) ); iCurrentRadioState = EFMRadioStateOff; + + CAknGlobalNote* fmTransmitterGlobalNote = CAknGlobalNote::NewLC(); + if ( IsStartupWizardHandled() ) { // Wizard is allready handled so this callback is not coming // in startup phase HBufC* closeAppText = StringLoader::LoadLC( R_QTN_FMRADIO_NOTE_FMTX_CLOSE_APPLICATION, iCoeEnv ); - - CAknGlobalNote* fmTransmitterGlobalNote = CAknGlobalNote::NewLC(); fmTransmitterGlobalNote->ShowNoteL( EAknGlobalInformationNote, *closeAppText ); - CleanupStack::PopAndDestroy( fmTransmitterGlobalNote ); - CleanupStack::PopAndDestroy( closeAppText ); } else { HBufC* unableToStartText = StringLoader::LoadLC( R_QTN_FMRADIO_NOTE_FMTX_UNABLE_TO_START, iCoeEnv ); - - CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); - note->ExecuteLD( *unableToStartText ); - + fmTransmitterGlobalNote->ShowNoteL( EAknGlobalInformationNote, *unableToStartText ); CleanupStack::PopAndDestroy( unableToStartText ); } + CleanupStack::PopAndDestroy( fmTransmitterGlobalNote ); // check if we have any dialogs open and close them manually if ( IsDisplayingDialog() ) { diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/src/fmradiomainview.cpp --- a/fmradio/fmradio/src/fmradiomainview.cpp Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/src/fmradiomainview.cpp Wed Mar 31 21:31:32 2010 +0300 @@ -982,18 +982,19 @@ aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); } CFMRadioAppUi* appUi = static_cast( iCoeEnv->AppUi() ); - if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound ) // current frequency not saved - { - aMenuPane->SetItemDimmed( EFMRadioCmdRename, ETrue ); - aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, EFalse ); + if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound || + iRadioEngine->GetRadioMode() == CRadioEngine::ERadioTunerMode ) // current frequency not saved + { + aMenuPane->SetItemDimmed( EFMRadioCmdRename, ETrue ); + aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, EFalse ); aMenuPane->SetItemDimmed( EFMRadioCmdErase, ETrue ); - } + } else - { - aMenuPane->SetItemDimmed( EFMRadioCmdRename, EFalse ); - aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, ETrue ); + { + aMenuPane->SetItemDimmed( EFMRadioCmdRename, EFalse ); + aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, ETrue ); aMenuPane->SetItemDimmed( EFMRadioCmdErase, EFalse ); - } + } } if ( aResourceId == R_FMRADIO_OPTIONS_AF_SUB_MENU ) // Rds af search sub menu @@ -1223,7 +1224,8 @@ CFMRadioAppUi* appUi = static_cast( iCoeEnv->AppUi() ); CAknToolbarExtension* toolbarExtension = iToolbar->ToolbarExtension(); - if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound ) + if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound || + iRadioEngine->GetRadioMode() == CRadioEngine::ERadioTunerMode ) { // current frequency not saved // show save diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/src/fmradiomusicstorehandler.cpp --- a/fmradio/fmradio/src/fmradiomusicstorehandler.cpp Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/src/fmradiomusicstorehandler.cpp Wed Mar 31 21:31:32 2010 +0300 @@ -470,7 +470,8 @@ aCommandId = EFMRadioMusicStoreNokiaMusicShop; } - HBufC* searchString = NULL; + RBuf searchString; + searchString.CleanupClosePushL(); TBool isHandled = ETrue; switch( aCommandId ) @@ -482,19 +483,18 @@ isHandled = EFalse; break; case EFMRadioMusicStoreNokiaMusicShop: - searchString = NokiaMusicShopSearchLC( aTitle, aArtist, aAlbum ); + searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) ); break; case EFMRadioMusicStoreOperator: if ( iOperatorStoreWebsite.Length() != 0 ) { - searchString = iOperatorStoreWebsite.AllocLC(); - + searchString.CreateL( iOperatorStoreWebsite ); } else if ( iOperatorStoreNativeUID ) { // It is assumed that both Nokia Music Shop and operator specific music store use // same kind of interface to communicate - searchString = NokiaMusicShopSearchLC( aTitle, aArtist, aAlbum ); + searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) ); } else { @@ -514,17 +514,17 @@ case EFMRadioMusicStoreNokiaMusicShop: { TUid musicshopUid( TUid::Uid( iMusicStoreUID ) ); - LaunchMusicShopL( musicshopUid, *searchString ); + LaunchMusicShopL( musicshopUid, searchString ); break; } case EFMRadioMusicStoreOperator: - LaunchOperatorMusicStoreL( *searchString ); + LaunchOperatorMusicStoreL( searchString ); break; default: - LaunchWebPageL( *searchString ); + LaunchWebPageL( searchString ); break; } - CleanupStack::PopAndDestroy( searchString ); + CleanupStack::PopAndDestroy( &searchString ); } } @@ -555,22 +555,27 @@ // CFMRadioMusicStoreHandler::NokiaMusicShopSearchL // ----------------------------------------------------------------------------- // -HBufC* CFMRadioMusicStoreHandler::NokiaMusicShopSearchLC( +HBufC* CFMRadioMusicStoreHandler::NokiaMusicShopSearchL( const TDesC& aSongName, const TDesC& aArtistName, const TDesC& aAlbumName ) { - CMPXFindInMShop* finder = CMPXFindInMShop::NewL(); //ECom Plugin - CleanupStack::PushL( finder ); - HBufC* url = finder->CreateSearchURLL( aSongName, - aArtistName, - aAlbumName, - KNullDesC, // Composer - Not used - KNullDesC ); // Genre - Not used - - CleanupStack::PopAndDestroy( finder ); // finder - REComSession::FinalClose(); - CleanupStack::PushL( url ); + HBufC* url = NULL; + + if ( aSongName.Length() || aArtistName.Length() || aAlbumName.Length() ) + { + CMPXFindInMShop* finder = CMPXFindInMShop::NewL(); //ECom Plugin + CleanupStack::PushL( finder ); + url = finder->CreateSearchURLL( aSongName, + aArtistName, + aAlbumName, + KNullDesC, // Composer - Not used + KNullDesC ); // Genre - Not used + + CleanupStack::PopAndDestroy( finder ); // finder + REComSession::FinalClose(); + } + return url; } @@ -581,13 +586,16 @@ // void CFMRadioMusicStoreHandler::LaunchMusicShopL( TUid aMusicshopUid, const TDesC& aSearchString ) { - RProperty::Set( aMusicshopUid, - KMShopCategoryName, - aSearchString ); - - RProperty::Set( aMusicshopUid, - KMShopCategoryId, - KFindInMShopKeyValid ); // Set Key to Valid + if ( aSearchString.Length() ) + { + RProperty::Set( aMusicshopUid, + KMShopCategoryName, + aSearchString ); + + RProperty::Set( aMusicshopUid, + KMShopCategoryId, + KFindInMShopKeyValid ); // Set Key to Valid + } TApaTaskList taskList( iCoeEnv->WsSession() ); TApaTask task = taskList.FindApp( aMusicshopUid ); diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradio/src/fmradioscanlocalstationsview.cpp --- a/fmradio/fmradio/src/fmradioscanlocalstationsview.cpp Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradio/src/fmradioscanlocalstationsview.cpp Wed Mar 31 21:31:32 2010 +0300 @@ -890,7 +890,7 @@ restoreFrequency = ETrue; } UpdateToolbar(); - RestoreRadio( restoreFrequency ); + RestoreRadio( restoreFrequency, EFalse ); // update now playing index if the tuning is triggered from accessory TInt frequencyIndex = FrequencyIndex( tunedFrequency ); @@ -912,7 +912,7 @@ // Restores the radio after scanning // ----------------------------------------------------------------------------------------------- // -void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency ) +void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency, TBool aUnmute ) { FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::RestoreRadio") ) ); CFMRadioAppUi* appUi = static_cast( iCoeEnv->AppUi() ); @@ -924,8 +924,10 @@ iTuneRequested = ETrue; iRadioEngine.Tune( iInitialTunedFrequency ); } - //unmute radio - iRadioEngine.SetMuteOn( EFalse ); + if ( aUnmute ) // set mute off by default + { + iRadioEngine.SetMuteOn( EFalse ); + } iInitialTunedFrequency = 0; } appUi->SetStartupWizardRunning( EFalse ); diff -r 3cb097cb90f8 -r 95ac6b0f7f5b fmradio/fmradioengine/group/bld.inf --- a/fmradio/fmradioengine/group/bld.inf Mon Mar 15 12:40:34 2010 +0200 +++ b/fmradio/fmradioengine/group/bld.inf Wed Mar 31 21:31:32 2010 +0300 @@ -34,9 +34,6 @@ // iby file ../rom/fmradioengine.iby CORE_APP_LAYER_IBY_EXPORT_PATH(fmradioengine.iby) -../cenrep/2001b25e.txt z:/private/10202be9/2001b25e.txt - - // *.mmp files required for building the needed component // PRJ_MMPFILES diff -r 3cb097cb90f8 -r 95ac6b0f7f5b package_definition.xml --- a/package_definition.xml Mon Mar 15 12:40:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -