# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282200921 -10800 # Node ID 1a6714c53019af7860d94f7373acb9ec90fa8041 # Parent e4d7a31227b8403f1d77adec00ebd22fb21c9e47 Revision: 201031 Kit: 201033 diff -r e4d7a31227b8 -r 1a6714c53019 fmradio/fmradio/inc/fmradiomusicstorehandler.h --- a/fmradio/fmradio/inc/fmradiomusicstorehandler.h Thu Jul 15 18:39:19 2010 +0300 +++ b/fmradio/fmradio/inc/fmradiomusicstorehandler.h Thu Aug 19 09:55:21 2010 +0300 @@ -257,6 +257,11 @@ * UID for Operator music store (native app.) */ TUint32 iOperatorStoreNativeUID; + + /* + * UID for operator java client app + */ + TUid iOperatorJavaMusicStoreUID; /** * Website where Operator music store can be found diff -r e4d7a31227b8 -r 1a6714c53019 fmradio/fmradio/src/fmradioappui.cpp --- a/fmradio/fmradio/src/fmradioappui.cpp Thu Jul 15 18:39:19 2010 +0300 +++ b/fmradio/fmradio/src/fmradioappui.cpp Thu Aug 19 09:55:21 2010 +0300 @@ -1357,15 +1357,22 @@ if ( !(iFMRadioVariationFlags & KFMRadioInternalAntennaSupported) && iCurrentRadioState != EFMRadioStateOffForPhoneCall && iCurrentRadioState != EFMRadioStateOffBeforePhoneCall ) - { + { + if ( !iRadioEngine->IsRadioOn() && !iRadioEngine->IsInCall() ) + { + FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Turn radio on") ) ); + TurnRadioOn(); + } // active offline query controls radio on/off - if ( iAudioLost ) + else if ( iAudioLost ) { + FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Try to resume") ) ); TRAP_IGNORE( TryToResumeAudioL() ); } else if ( ( iGlobalOfflineQuery && !iGlobalOfflineQuery->IsActive() ) || !iGlobalOfflineQuery ) { + FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Offline query") ) ); iRadioEngine->InitializeRadio(); } HandleVolumeChangedCallback(); diff -r e4d7a31227b8 -r 1a6714c53019 fmradio/fmradio/src/fmradiomusicstorehandler.cpp --- a/fmradio/fmradio/src/fmradiomusicstorehandler.cpp Thu Jul 15 18:39:19 2010 +0300 +++ b/fmradio/fmradio/src/fmradiomusicstorehandler.cpp Thu Aug 19 09:55:21 2010 +0300 @@ -44,6 +44,7 @@ const TUint32 KOperatorMusicStoreType = 0x5; const TUint32 KOperatorMusicStoreDisplayName = 0x6; const TUint32 KOperatorMusicStoreNativeUid = 0x7; +const TUint32 KOperatorMusicStoreJavaName = 0x8; const TUint32 KOperatorMusicStoreWebPage = 0x9; const TUint32 KOperatorMusicStoreURI = 0xA; const TInt TUInt32HexLength = 8; @@ -219,8 +220,40 @@ break; } case EFMRadioJavaApp: - // Java application not supported currently + { + TApaAppInfo appInfo; + RBuf operatorJavaAppName; + operatorJavaAppName.CleanupClosePushL(); + operatorJavaAppName.CreateL( appInfo.iCaption.MaxLength() ); // caption length should be enough + + TInt err = aRepository.Get( KOperatorMusicStoreJavaName, operatorJavaAppName ); + + if ( !err ) + { + _LIT( KFakeName, ".fakeapp" ); + RApaLsSession apaSession; + User::LeaveIfError( apaSession.Connect() ); + CleanupClosePushL( apaSession ); + User::LeaveIfError( apaSession.GetAllApps() ); + + while ( apaSession.GetNextApp( appInfo ) == KErrNone ) + { + if ( appInfo.iFullName.Right( 8 ).Compare( KFakeName ) == 0) + { + TApaAppCaption appname; + appname = appInfo.iCaption; + if ( !appInfo.iCaption.Compare( operatorJavaAppName ) ) + { + FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::InitializeParametersL( Operator Java UID found, name: %S)"), &operatorJavaAppName )); + iOperatorJavaMusicStoreUID = appInfo.iUid; + } + } + } + CleanupStack::PopAndDestroy( &apaSession ); // close apaSession + } + CleanupStack::PopAndDestroy( &operatorJavaAppName ); break; + } case EFMRadioWebsite: { const TInt initialSize = 5; @@ -473,37 +506,41 @@ RBuf searchString; searchString.CleanupClosePushL(); - TBool isHandled = ETrue; + TBool isHandled = EFalse; switch( aCommandId ) { case EFMRadioMusicStoreGoogle: case EFMRadioMusicStoreWikipedia: case EFMRadioMusicStoreAmg: case EFMRadioMusicStoreMusicPortl: - isHandled = EFalse; break; case EFMRadioMusicStoreNokiaMusicShop: + isHandled = ETrue; searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) ); break; case EFMRadioMusicStoreOperator: if ( iOperatorStoreWebsite.Length() != 0 ) { + isHandled = ETrue; searchString.CreateL( iOperatorStoreWebsite ); } else if ( iOperatorStoreNativeUID ) { + isHandled = ETrue; // It is assumed that both Nokia Music Shop and operator specific music store use // same kind of interface to communicate searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) ); } + else if ( iOperatorJavaMusicStoreUID.iUid ) + { + isHandled = ETrue; + } else { - isHandled = EFalse; } break; default: FTRACE( FPrint( _L("CFMRadioMusicStoreHandler::LaunchMusicStoreL - Unknown id = %d"), aCommandId ) ); - isHandled = EFalse; break; } @@ -524,8 +561,8 @@ LaunchWebPageL( searchString ); break; } - CleanupStack::PopAndDestroy( &searchString ); } + CleanupStack::PopAndDestroy( &searchString ); } // ----------------------------------------------------------------------------- @@ -534,17 +571,30 @@ // void CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL( const TDesC& aSearchString ) { + FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL('%S')"), &aSearchString)); if ( iOperatorStoreWebsite.Length() != 0 ) { + FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Website") )); LaunchWebPageL( aSearchString ); } else if ( iOperatorStoreNativeUID ) { // It is assumed that both Nokia Music Shop and operator specific music store use // same kind of interface to communicate + FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Operator Native UID") )); TUid musicshopUid( TUid::Uid( iOperatorStoreNativeUID ) ); LaunchMusicShopL( musicshopUid, aSearchString ); } + else if ( iOperatorJavaMusicStoreUID.iUid ) + { + FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Operator Java UID") )); + TThreadId threadId; + RApaLsSession apaSession; + User::LeaveIfError( apaSession.Connect() ); + CleanupClosePushL( apaSession ); + apaSession.StartDocument( KNullDesC, iOperatorJavaMusicStoreUID, threadId ); + CleanupStack::PopAndDestroy( &apaSession ); // close apaSession + } else { //NOP diff -r e4d7a31227b8 -r 1a6714c53019 fmradio/help/data/xhtml.zip Binary file fmradio/help/data/xhtml.zip has changed diff -r e4d7a31227b8 -r 1a6714c53019 fmradio/loc/fmradio.loc --- a/fmradio/loc/fmradio.loc Thu Jul 15 18:39:19 2010 +0300 +++ b/fmradio/loc/fmradio.loc Thu Aug 19 09:55:21 2010 +0300 @@ -263,7 +263,7 @@ // d: Shown if the 3.5mm analog audio accessory required as antenna is not connected // l: popup_note_window // -#define qtn_fmradio_error_con_headset "Connect wired headset with 3.5mm connector" +#define qtn_fmradio_error_con_headset "Please connect your wired headset with the phone’s 3.5mm connector" // d: Confirmation query // d: Replaces all existing stations with the new ones on the list.