Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:11 +0200
branchRCL_3
changeset 12 171e07ac910f
parent 11 943ff5625028
child 13 c8156a91d13c
Revision: 201009 Kit: 201010
mpxmusicplayer/commonui/src/mpxalbumartutil.cpp
mpxmusicplayer/commonui/src/mpxcommonuihelper.cpp
mpxmusicplayer/metadatahandler/src/mpxmetadatahandlerimp.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbplugin/src/mpxdbplugin.cpp
mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/inc/mpxpodcastdbhandler.h
mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbhandler.cpp
mpxplugins/viewplugins/inc/mpxcommonplaybackviewimp.h
mpxplugins/viewplugins/views/audioeffectsview/group/mpxaudioeffectsview.mmp
mpxplugins/viewplugins/views/audioeffectsview/inc/mpxaudioeffectsviewimp.h
mpxplugins/viewplugins/views/audioeffectsview/src/mpxaudioeffectsviewimp.cpp
mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss
mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h
mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp
mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp
mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgtnloader.cpp
mpxplugins/viewplugins/views/commoncontainer/src/mpxcommonlistboxarraybase.cpp
mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewcontainer.cpp
mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp
musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h
musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp
musicplayer_plat/mpx_music_player_commonui_api/inc/mpxalbumartutil.h
--- a/mpxmusicplayer/commonui/src/mpxalbumartutil.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxmusicplayer/commonui/src/mpxalbumartutil.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -317,20 +317,18 @@
             {
             CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( album, KMPXAlbumMimeType );
             TInt ret = NULL;
-            TInt err = KErrNone;
-            if(iThumbnailManager )
+            if(iThumbnailManager && iReqId >0)
                 {
-                if(iReqId >0)
-                    {	
-                    iThumbnailManager->CancelRequest( iReqId );
-                    }
-                TRAP(err, iReqId = TInt (iThumbnailManager->GetThumbnailL( *source, (TAny*)ret)));
-                }   
-
-            if( err != KErrNone)
-                {
-                User::Leave( KErrNotFound );
-                }  
+                iThumbnailManager->CancelRequest( iReqId );
+                }
+			if(iThumbnailManager)
+				{   
+            	TRAPD(err, iReqId = TInt (iThumbnailManager->GetThumbnailL( *source, (TAny*)ret)));	
+    	        if( err != KErrNone)
+                	{
+                	User::Leave( KErrNotFound );
+                	}
+				}  
             CleanupStack::PopAndDestroy( source );
             }
         }
--- a/mpxmusicplayer/commonui/src/mpxcommonuihelper.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxmusicplayer/commonui/src/mpxcommonuihelper.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -107,7 +107,7 @@
 
 const TText KRightToLeftMark = 0x200F;
 
-const TInt KMPXChunkSize = 100;  // number of songs added in each chunk, IncAddL
+const TInt KMPXChunkSize = 50;  // number of songs added in each chunk, IncAddL
 const TInt KSQLErrGeneral = -311; // SQL General error. Don't want to include sql header here
 
 _LIT( KMPXCommonUiRscPath, "mpxcommonui.rsc" );
--- a/mpxmusicplayer/metadatahandler/src/mpxmetadatahandlerimp.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxmusicplayer/metadatahandler/src/mpxmetadatahandlerimp.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -145,6 +145,10 @@
     iEqPresetListener->StartL();
     iTrackNumber = 0;
     iColId.iUid = -1;
+    
+    //Notify accessories that currently no track is playing.
+    iPlayerEventsObserver->TrackChanged(MPlayerEventsObserver::KNoTrackSelected, 
+        MPlayerEventsObserver::KPlaybackPositionUnknown);
     }
 
 // ---------------------------------------------------------------------------
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -138,7 +138,7 @@
         {
         TUint at = (begin + end) / 2;
         const TMimeMapItem & item = KMimeMap[at];
-        TUint r = item.iExt->CompareF(extension);
+        TInt r = item.iExt->CompareF(extension);
         if (r == 0)
             {
             return item.iType;
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h	Mon Mar 15 12:40:11 2010 +0200
@@ -940,6 +940,7 @@
         /**
         * Verify the volume id for the databases
         */
+        void VerifyVolumeIdL( TInt aDrive );
         void VerifyVolumeIdL();
 
 
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -255,8 +255,8 @@
             if (aItemChangedMessages)
                 {
                 // add the item changed message
-                MPXDbCommonUtil::AddItemChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified,
-                    iCategory, KDBPluginUid);
+                MPXDbCommonUtil::AddItemAlbumChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified,
+                    EMPXAlbum, KDBPluginUid, ETrue, 0 );  
                 }
             }
 
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -1294,7 +1294,7 @@
     iDbManager->OpenDatabaseL(aDrive);
 
     // Verify the volume ID after a remount event
-    VerifyVolumeIdL();
+    VerifyVolumeIdL( aDrive );
     }
 
 // ----------------------------------------------------------------------------
@@ -2671,36 +2671,32 @@
 // Verifies that the volume ID of the database matches the drive
 // ----------------------------------------------------------------------------
 //
-void CMPXDbHandler::VerifyVolumeIdL()
+void CMPXDbHandler::VerifyVolumeIdL( TInt aDrive )
     {
     MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL <--");
-
-    TInt count( iDbDrives.Count() );
-    for( TInt i=0; i<count; ++i )
-        {
-        if( iDbManager->IsOpen( iDbDrives[i] ) )
+        if( iDbManager->IsOpen( aDrive ) )
             {
             TVolumeInfo volInfo;
-            iFs.Volume(volInfo, iDbDrives[i] );
+            iFs.Volume(volInfo, aDrive );
             TUint curId(volInfo.iUniqueID);
 
-            TInt volId = iDbAuxiliary->IdL( iDbDrives[i] );
+            TInt volId = iDbAuxiliary->IdL( aDrive );
 
             // New database, no volume id set, mask out top bit because this is an uint
             //
             MPX_DEBUG3("CMPXDBHandler::VerifyVolumeIdL drive:%i db:%i", curId, volId);
-            if( volId == 0 )
+            if( volId == 0 && (curId&0x7FFFFFFF) )
                 {
                 MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL -- New ID");
                 BeginTransactionL();
-                TRAPD( err, iDbAuxiliary->SetIdL( iDbDrives[i], curId&0x7FFFFFFF ) );
+                TRAPD( err, iDbAuxiliary->SetIdL( aDrive, curId&0x7FFFFFFF ) );
                 EndTransactionL( err );
 
                 // KSqlDbCorrupted indicates DB corrupted, need to recreate.
                 if ( err == KSqlDbCorrupted )
                     {
                     MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- Corrupted DB");
-                    iDbManager->RecreateDatabaseL(iDbDrives[i]);
+                    iDbManager->RecreateDatabaseL(aDrive);
                     BeginTransactionL();
                     TRAPD(err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
                     EndTransactionL( err );
@@ -2711,12 +2707,27 @@
             else if ( (curId&0x7FFFFFFF) != (volId&0x7FFFFFFFF) )
                 {
                 MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL -- ID match FAILED");
-                iDbManager->RecreateDatabaseL(iDbDrives[i]);
+                iDbManager->RecreateDatabaseL(aDrive);
                 BeginTransactionL();
                 TRAPD(err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
                 EndTransactionL( err );
                 }
             }
+
+    MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL -->");
+    }
+
+// ----------------------------------------------------------------------------
+// Verifies that the volume ID of the database matches the drive
+// ----------------------------------------------------------------------------
+//
+void CMPXDbHandler::VerifyVolumeIdL()
+    {
+    MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL <--");
+    TInt count( iDbDrives.Count() );
+    for( TInt i=0; i<count; ++i )
+        {
+        VerifyVolumeIdL(iDbDrives[i]);
         }
     MPX_DEBUG1("CMPXDbHandler::VerifyVolumeIdL -->");
     }
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -64,7 +64,7 @@
 
 const TUid KCRUIDMusicPlayerFeatures = { 0x101FFCD0 };
 const TInt KMusicPlayerFeatures = 1;
-const TInt KDisablePodcasting = 0x80;
+const TInt KDisablePodcasting = 0x08;
 
 const TInt KIncrementalDeleteCount = 400;
 
@@ -792,65 +792,66 @@
     TInt levels(aPath.Levels());
     TBool isASong(EFalse);
 
-    aEntries.SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, aPath.Id(levels - 1));
-
-    if (1 == levels)
-        {
-        // return the "main menu"
-        count = iMusicLibraryMenuTitles->Count();
-        RArray<TMPXItemId> ids;
-        CleanupClosePushL(ids);
-
-        // due to ui changes, the order of main menu is changed
-        // since multiple clients hardcode indexes to each entry,
-        // the enum cannot be changed, instead we will have to
-        // manually change the display order to minimize the impact to
-        // external clients
-
-        // change from:
-        // all songs, playlist, artist, album, (podcast), genre, composer
-        // to:
-        // artist, album, playlist, all songs, (podcast), genre, composer
-        for (TInt i = EBrowseArtist; i <= EBrowseAlbum; ++i)
+
+	if ( 1 == levels )
+	    {
+
+	    // Redirecting all open requests at level 1 to open albums 
+	    // due to UI changes that removed the library menu collection level.
+        TInt acount = array->Count();
+        MPX_DEBUG2(" array count11 [%d]", acount);
+        
+ 		CMPXCollectionPath* path = CMPXCollectionPath::NewL(aPath);
+		CleanupStack::PushL( path );
+		
+		path->AppendL(3); // Albums
+		TInt whatLevel = path->Levels();
+
+		MPX_DEBUG_PATH(*path);
+		
+		aEntries.SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, path->Id(whatLevel - 1) );
+		
+      // Create a media which hold the pointer to the returned path
+        if (aEntries.IsSupported(KMPXMediaGeneralValue))
             {
-            MPXDbCommonUtil::AppendMediaL(*array, iMusicLibraryMenuTitles->MdcaPoint(i), EMPXGroup,
-                CategoryForBrowseType(static_cast<TMCBrowseType>(i)), iMusicLibraryMenuIds[i]);
-            ids.AppendL(TMPXItemId(iMusicLibraryMenuIds[i]));
+            MPX_DEBUG1(" pointer to the returned path ");
+            CMPXMedia* pMedia = CMPXMedia::NewL();
+            CleanupStack::PushL(pMedia);
+            pMedia->SetTObjectValueL<TInt>(KMPXMediaGeneralValue,
+                                          aEntries.ValueTObjectL<TInt>(KMPXMediaGeneralValue));
+            array->AppendL(*pMedia);
+            CleanupStack::PopAndDestroy(pMedia);
             }
-        MPXDbCommonUtil::AppendMediaL(*array, iMusicLibraryMenuTitles->MdcaPoint(1), EMPXGroup,
-            CategoryForBrowseType(static_cast<TMCBrowseType>(1)), iMusicLibraryMenuIds[1]);
-        ids.AppendL(TMPXItemId(iMusicLibraryMenuIds[1]));
-        MPXDbCommonUtil::AppendMediaL(*array, iMusicLibraryMenuTitles->MdcaPoint(0), EMPXGroup,
-            CategoryForBrowseType(static_cast<TMCBrowseType>(0)), iMusicLibraryMenuIds[0]);
-        ids.AppendL(TMPXItemId(iMusicLibraryMenuIds[0]));
-
-#ifdef __ENABLE_PODCAST_IN_MUSIC_MENU
-        if( !iDisablePodcasting )
+		
+	
+        RArray<TMPXAttribute> openAttrs;
+        CleanupClosePushL(openAttrs);
+
+        RArray<TInt> supportedIds;
+        CleanupClosePushL(supportedIds);
+
+        SetAttributesL(*path, openAttrs, supportedIds);
+        openAttrs.AppendL(KMPXMediaArrayContents);
+        
+        CleanupStack::PopAndDestroy(&supportedIds);
+		
+		if( iAllSongsValid )
+		    {
+		    isASong = DoOpenBrowseAlbumL( *path, openAttrs.Array(), aEntries, array );
+		    }
+		CleanupStack::PopAndDestroy(&openAttrs);
+		CleanupStack::PopAndDestroy( path );
+
+        //Remove the first media
+        if ( array->Count() &&
+            (*array)[0]->IsSupported(KMPXMediaGeneralValue))
             {
-            MPXDbCommonUtil::AppendMediaL(*array, iMusicLibraryMenuTitles->MdcaPoint(EBrowsePodcasts), EMPXGroup,
-                CategoryForBrowseType(static_cast<TMCBrowseType>(EBrowsePodcasts)), iMusicLibraryMenuIds[EBrowsePodcasts]);
-            ids.AppendL(TMPXItemId(iMusicLibraryMenuIds[EBrowsePodcasts]));
+            array->Remove(0);
             }
-#endif // __ENABLE_PODCAST_IN_MUSIC_MENU
-
-        // Genre and composer
-        for (TInt i = ( EBrowseGenre ); i < count; ++i)
-            {
-            MPXDbCommonUtil::AppendMediaL(*array, iMusicLibraryMenuTitles->MdcaPoint(i), EMPXGroup,
-                CategoryForBrowseType(static_cast<TMCBrowseType>(i)), iMusicLibraryMenuIds[i]);
-            ids.AppendL(TMPXItemId(iMusicLibraryMenuIds[i]));
-            }
-
-        TInt pPath = aEntries.ValueTObjectL<TInt>(KMPXMediaGeneralValue);
-        MPX_ASSERT(pPath);
-        ((CMPXCollectionPath*)pPath)->AppendL(ids.Array());
-        CleanupStack::PopAndDestroy(&ids);
-        SetMediaGeneralAttributesL(aEntries, EMPXGroup, EMPXCollection, *iMusicMenuTitle);
-        aEntries.SetTObjectValueL<TMPXGeneralNonPermissibleActions>(
-            KMPXMediaGeneralNonPermissibleActions, EMPXWrite);
-        }
+	    }
     else if (levels >= 2)
         {
+	    aEntries.SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, aPath.Id(levels - 1));
         // Create a media which hold the pointer to the returned path
         if (aEntries.IsSupported(KMPXMediaGeneralValue))
             {
@@ -3820,7 +3821,14 @@
     // Cancel is called, no need to callback to observer
     if (aErr != KErrCancel)
         {
-        iObs->HandleCommandComplete(NULL, aErr);
+        if( iActiveTask->GetTask() == KMPXCommandIdCollectionAdd )
+            {
+            iObs->HandleCommandComplete( &iActiveTask->GetCommand(), aErr );
+            }
+        else
+            {
+            iObs->HandleCommandComplete(NULL, aErr);
+            }
         }
 
     if( iDbHandler->InTransaction() )
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbplugin/src/mpxdbplugin.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbplugin/src/mpxdbplugin.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -64,7 +64,7 @@
 
 const TUid KCRUIDMusicPlayerFeatures = { 0x101FFCD0 };
 const TInt KMusicPlayerFeatures = 1;
-const TInt KDisablePodcasting = 0x80;
+const TInt KDisablePodcasting = 0x08;
 
 const TInt KIncrementalDeleteCount = 400;
 
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/inc/mpxpodcastdbhandler.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/inc/mpxpodcastdbhandler.h	Mon Mar 15 12:40:11 2010 +0200
@@ -469,6 +469,7 @@
         /**
         * Verify the volume id for the databases
         */
+        void VerifyVolumeIdL( TInt aDrive );
         void VerifyVolumeIdL();
 
         /**
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbhandler.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbhandler.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -795,7 +795,7 @@
     iDbManager->OpenDatabaseL(aDrive);
 
     // Verify the volume ID after a remount event
-    VerifyVolumeIdL();
+    VerifyVolumeIdL( aDrive );
     }
 
 // ----------------------------------------------------------------------------
@@ -1425,52 +1425,64 @@
 // Verifies that the volume ID of the database matches the drive
 // ----------------------------------------------------------------------------
 //
+void CMPXPodcastDbHandler::VerifyVolumeIdL( TInt aDrive )
+    {
+    MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL <--");
+
+    if( iDbManager->IsOpen(aDrive) )
+        {
+        TVolumeInfo volInfo;
+        iFs.Volume(volInfo, aDrive );
+        TUint curId(volInfo.iUniqueID);
+
+        TInt volId = iDbAuxiliary->IdL( aDrive );
+
+        // New database, no volume id set, mask out top bit because this is an uint
+        //
+        MPX_DEBUG3("CMPXPodcastDbHandler::VerifyVolumeIdL drive:%i db:%i", curId, volId);
+        if( volId == 0 && (curId&0x7FFFFFFF) )
+            {
+            MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- New ID");
+            BeginTransactionL();
+            TRAPD( err, iDbAuxiliary->SetIdL( aDrive, curId&0x7FFFFFFF ) );
+            EndTransactionL( err );
+
+            // KSqlDbCorrupted indicates DB corrupted, need to recreate.
+            if ( err == KSqlDbCorrupted )
+                {
+                MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- Corrupted DB");
+                iDbManager->RecreateDatabaseL( aDrive );
+                BeginTransactionL();
+                TRAPD( err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
+                EndTransactionL( err );
+                }
+            }
+        // Unmatched volume id, mark db as corrupt
+        //
+        else if ( (curId&0x7FFFFFFF) != (volId&0x7FFFFFFFF) )
+            {
+            MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- ID match FAILED");
+            iDbManager->RecreateDatabaseL( aDrive );
+            BeginTransactionL();
+            TRAPD( err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
+            EndTransactionL( err );
+            }
+        }
+    MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -->");
+    }
+
+
+// ----------------------------------------------------------------------------
+// Verifies that the volume ID of the database matches the drive
+// ----------------------------------------------------------------------------
+//
 void CMPXPodcastDbHandler::VerifyVolumeIdL()
     {
     MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL <--");
-
     TInt count( iDbDrives.Count() );
     for( TInt i=0; i<count; ++i )
         {
-        if( iDbManager->IsOpen(iDbDrives[i]) )
-            {
-            TVolumeInfo volInfo;
-            iFs.Volume(volInfo, iDbDrives[i] );
-            TUint curId(volInfo.iUniqueID);
-
-            TInt volId = iDbAuxiliary->IdL( iDbDrives[i] );
-
-            // New database, no volume id set, mask out top bit because this is an uint
-            //
-            MPX_DEBUG3("CMPXPodcastDbHandler::VerifyVolumeIdL drive:%i db:%i", curId, volId);
-            if( volId == 0 )
-                {
-                MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- New ID");
-                BeginTransactionL();
-                TRAPD( err, iDbAuxiliary->SetIdL( iDbDrives[i], curId&0x7FFFFFFF ) );
-                EndTransactionL( err );
-
-                // KSqlDbCorrupted indicates DB corrupted, need to recreate.
-                if ( err == KSqlDbCorrupted )
-                    {
-                    MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- Corrupted DB");
-                    iDbManager->RecreateDatabaseL(iDbDrives[i]);
-                    BeginTransactionL();
-                    TRAPD(err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
-                    EndTransactionL( err );
-                    }
-                }
-            // Unmatched volume id, mark db as corrupt
-            //
-            else if ( (curId&0x7FFFFFFF) != (volId&0x7FFFFFFFF) )
-                {
-                MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -- ID match FAILED");
-                iDbManager->RecreateDatabaseL(iDbDrives[i]);
-                BeginTransactionL();
-                TRAPD(err, iDbAuxiliary->SetDBCorruptedL( ETrue ) );
-                EndTransactionL( err );
-                }
-            }
+        VerifyVolumeIdL(iDbDrives[i]);
         }
     MPX_DEBUG1("CMPXPodcastDbHandler::VerifyVolumeIdL -->");
     }
--- a/mpxplugins/viewplugins/inc/mpxcommonplaybackviewimp.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/inc/mpxcommonplaybackviewimp.h	Mon Mar 15 12:40:11 2010 +0200
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  MPX common playback view implementation
-*  Version     : %version: da1mmcf#41.1.6.1.1.1.9 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: da1mmcf#41.1.6.1.1.1.10 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -642,6 +642,12 @@
      * @param aPtr pointer to self
      */
     static TInt HandleDelayedError( TAny* aPtr );
+    
+    /**
+     * Callback function of timer to handle TN request for custom size
+     * @param aPtr pointer to self
+     */
+    static TInt HandleTNRequestForCustomSizeL( TAny* aPtr );
 
 protected:    // Data
 
@@ -754,6 +760,9 @@
 	TInt iOldPosition; // in seconds
 	TBool iIsTapped;
     TCommandSender iCommandSender;
+    
+    TSize iFullScreenImageSize;
+    CPeriodic* iTNRequestTimer;
     };
 
 #endif  // CMPXCOMMONPLAYBACKVIEWIMP_H
--- a/mpxplugins/viewplugins/views/audioeffectsview/group/mpxaudioeffectsview.mmp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/audioeffectsview/group/mpxaudioeffectsview.mmp	Mon Mar 15 12:40:11 2010 +0200
@@ -72,6 +72,7 @@
 LIBRARY     commonengine.lib
 LIBRARY     mpxplaybackutility.lib
 LIBRARY	    mpxcommon.lib
+LIBRARY     mpxviewutility.lib
 
 #if defined(ARMCC)
 deffile ../eabi/ 
--- a/mpxplugins/viewplugins/views/audioeffectsview/inc/mpxaudioeffectsviewimp.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/audioeffectsview/inc/mpxaudioeffectsviewimp.h	Mon Mar 15 12:40:11 2010 +0200
@@ -33,7 +33,7 @@
 class MMPXPlaybackUtility;
 class CMPXAudioEffectEngine;
 class CCustomCommandUtility;
-
+class MMPXViewUtility;
 
 /**
 *  CMPXAudioEffectsViewImp, View class for audio settings 
@@ -125,6 +125,7 @@
     
     TVwsViewId iPreviousView;
     TInt iResourceOffset;
+    MMPXViewUtility* iViewUtility;
     };
 
 #endif    // C_CMPXAUDIOEFFECTSVIEWIMP_H
--- a/mpxplugins/viewplugins/views/audioeffectsview/src/mpxaudioeffectsviewimp.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/audioeffectsview/src/mpxaudioeffectsviewimp.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -28,6 +28,7 @@
 
 #include <mpxplaybackutility.h>
 #include <mpxaudioeffectsview.rsg>
+#include <mpxviewutility.h>
 #include "mpxaudioeffectengine.h"
 
 #include "mpxaudioeffectsmodel.h"
@@ -71,6 +72,8 @@
     iPlaybackUtility = MMPXPlaybackUtility::UtilityL( KPbModeDefault );
 
     iModel = CMPXAudioEffectsModel::NewL( *iPlaybackUtility );
+        
+    iViewUtility = MMPXViewUtility::UtilityL();
     }
 
 // ---------------------------------------------------------------------------
@@ -113,6 +116,12 @@
         {
         CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
         }
+
+    if ( iViewUtility )
+        {
+        iViewUtility->Close();
+        }
+
     }
 
 // -----------------------------------------------------------------------------
@@ -159,6 +168,11 @@
             AppUi()->AppHelpContextL());
             break;
             }
+        case EAknSoftkeyBack:
+            {
+            iViewUtility->ActivatePreviousViewL();
+            break;
+            }
         default:
             {
             // Pass the command to AppUi to handle.
--- a/mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss	Mon Mar 15 12:40:11 2010 +0200
@@ -1480,14 +1480,14 @@
 
     
 //------------------------------------------------------------------------------
-// r_mpx_progress_note
-// Generic Progress note.      
+// r_mpx_wait_note
+// Generic Wait note.      
 //------------------------------------------------------------------------------
 //
-RESOURCE DIALOG r_mpx_progress_note
+RESOURCE DIALOG r_mpx_wait_note
     {
-    flags = EAknProgressNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    flags = EAknWaitNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
     items =
         {
         DLG_LINE
@@ -1496,7 +1496,8 @@
             id = 0x1000;
             control = AVKON_NOTE
                 {
-                layout = EProgressLayout;
+                layout = EWaitLayout;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
                 };
             }
         };
--- a/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h	Mon Mar 15 12:40:11 2010 +0200
@@ -21,7 +21,7 @@
 
 // INCLUDES
 #include <eikclb.h>
-#include <AknProgressDialog.h>  // MProgressDialogCallback
+#include <aknwaitdialog.h>
 #include <eikprogi.h>
 #include <mpxmediageneraldefs.h>
 #include <mpxcollectionobserver.h>
@@ -203,18 +203,17 @@
     void StartWaitNoteL( TWaitNoteType aNoteType );
 
     /**
-     * Start either the delete progress note
+     * Start either the delete wait note
      *
      */
-    void StartProgressNoteL();
+    void StartDeleteWaitNoteL();
 
     /**
      * Updates the progress note text and progress bar
      *
-     * @param aProgress Indicates the portion of the process completed
      * @param aProgressText Text to be displayed on the progress note
      */
-    void UpdateProcessL( TInt aProgress, const TDesC& aProgressText );
+    void UpdateProcessL( const TDesC& aProgressText );
 
     /**
     * Close a wait note
@@ -843,7 +842,8 @@
  	 * Stores the current list box item index.
  	 */
  	void StoreListboxItemIndexL();
-
+ 	
+ 	void ShowAddedItemsDialogL();
 
  	/*
  	 * Internal function for registering to BackStepping service.
@@ -904,7 +904,7 @@
     TBool                       iIgnoreNextFocusChangedMessage;
     TBool                       iCollectionReady;  // for incremental open
     TBool                       iCollectionCacheReady; //cache ready
-
+    
     TInt                        iCurrentPlaylistOp;
     TInt                        iNumSongAddedToPlaylist;
     TMPXItemId                  iPlaylistId;
@@ -982,9 +982,8 @@
     TInt iMusicStoreWebPage;
     HBufC16* iOperatorMusicStoreURI;
 
-    // Progress note for delete
-    CAknProgressDialog*	iProgressDialog;
-    CEikProgressInfo*	iProgressInfo;
+    // Wait note for delete
+    CAknWaitDialog*	iWaitDialog;
     TBool iIsAddingToPlaylist;  // flag used to handle the return by adding songs incrementally
     CUpnpCopyCommand* iUpnpCopyCommand;
 
@@ -992,6 +991,9 @@
 	TBool iMarkedAll;
 	TBool iFirstIncrementalBatch;
     CMPXMedia *iStoredAlbum; // owned
+    
+    TBool                       iDialogDismissed;
+    HBufC*                      iTitleWait; // Owned
     };
 
 #endif  // C_CMPXCOLLECTIONVIEWHGIMP_H
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -67,7 +67,7 @@
 
 #include <layoutmetadata.cdl.h>
 #include <akntranseffect.h>                 // For transition effects
-#include <gfxtranseffect\gfxtranseffect.h>  // For transition effects
+#include <gfxtranseffect/gfxtranseffect.h>  // For transition effects
 
 #include "mpxcommoncontainer.hrh"
 #include "mpxcollectionviewhg.hrh"
@@ -486,7 +486,7 @@
         {
         CEikImage* newIcon = iContextPane->SwapPicture( iOrigIcon );
         delete newIcon;
-        iOrigIcon = NULL; 
+        iOrigIcon = NULL;
         }
     }
 
@@ -742,10 +742,10 @@
             {
             if ( iCurrentViewType == EMPXViewMediawall )
                 {
-                if ( iDialog ) 
+                if ( iDialog )
                     {
                     iDialog->CancelPopup();
-                    }                
+                    }
                 }
             iSetEmptyTextNeeded = ETrue;
 
@@ -759,8 +759,6 @@
 
             iLayoutSwitch = ETrue;
 
-            if( iCbaHandler )
-                iCbaHandler->UpdateCba();
 
             TRect clientRect = ((CAknView*)iView)->ClientRect();
             SetRect( clientRect );
@@ -1188,7 +1186,19 @@
 
     HandleLbxItemRemovalL();
     TViewType prevViewType = iCurrentViewType;
-    ResolveCurrentViewType();
+    //no songs and no allbums, then its list view
+    if ( count > 0 )
+        {
+        ResolveCurrentViewType();
+        }
+    else
+        {
+        TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();
+        if( landscapeOrientation )
+            iCurrentViewType = EMPXViewMediawall;
+        else
+            iCurrentViewType = EMPXViewList;
+        }
 
     iThumbnailReqMap.Reset();
     if (ShuffleItemPresent())
@@ -1267,7 +1277,7 @@
         {
         LoadAndSetEmptyTextL();
         iSetEmptyTextNeeded = EFalse;
-        }    
+        }
     if( !iDefaultIconSet )
         {
         SetDefaultIconL();
@@ -1793,13 +1803,13 @@
 TBool CMPXCollectionViewHgContainer::IsTBoneView()
     {
     TBool tBoneView = EFalse;
-    
+
     if( EMPXViewTBone == iCurrentViewType )
         tBoneView = ETrue;
-    
+
     return tBoneView;
     }
-	
+
 // ----------------------------------------------------------------------------
 // Resolve the current view type based on the browsing context
 // ----------------------------------------------------------------------------
@@ -1821,7 +1831,6 @@
 					{
                 	iCurrentViewType = EMPXViewTBone;
                 	iContext = EContextItemAlbum;
-                	iOpenAlbumTracks = EFalse;
 					}
 				else
 					{
@@ -1895,7 +1904,7 @@
     MPX_FUNC( "CMPXCollectionViewHgContainer::IsSelectedItemASong" );
 
 	TBool res(EFalse);
-    if ( iContext == EContextItemAlbum || 
+    if ( iContext == EContextItemAlbum ||
          iContext == EContextGroupSong ||
          iContext == EContextItemGenre )
         {
@@ -1925,9 +1934,9 @@
 CMPXMedia* CMPXCollectionViewHgContainer::SelectedItemMediaL()
     {
     MPX_FUNC( "CMPXCollectionViewHgImp::SelectedItemMediaL" );
-    CMPXMedia* song = NULL;    
+    CMPXMedia* song = NULL;
     const CMPXMediaArray& albums = iListBoxArray->MediaArray();
-    CMPXMedia* album( albums.AtL( iSelectedAlbumIndex ) );    
+    CMPXMedia* album( albums.AtL( iSelectedAlbumIndex ) );
     const CMPXMediaArray* songs = album->Value<CMPXMediaArray>(KMPXMediaArrayContents);
     CHgScroller* listWidget = CurrentListWidget();
     if (listWidget && songs)
@@ -2270,30 +2279,61 @@
     {
     const CMPXMediaArray& mediaArray = iListBoxArray->MediaArray();
     TInt index(0);
-    for( TInt i = aBufferStart; i <= aBufferEnd; i++ )
+
+    if(iDirection == MHgScrollBufferObserver::EHgBufferScrollUp )
         {
-        // Just get the exiting item and update the fields + icon.
-        CHgItem* item = NULL;
-        if( iMediaWall )
-            item = &iMediaWall->ItemL(i);
-        else
-            item = &iListWidget->ItemL(i);
-
-        index = MediaIndex(i);
-        if ( index >= 0 )
-            {
-            CMPXMedia* currentMedia( mediaArray.AtL( index ) );
-            AddThumbnailToDisplayedItemL( item, currentMedia, index );
-            }
-        else
-        	{
-			if ( iCurrentViewType == EMPXViewMediawall ||
-				 iCurrentViewType == EMPXViewList && (i-iShuffleItem) == -1 )
-				SetDetailIconShuffleL(); 
-			iThumbnailReqMap[i] = ETrue;
-			RefreshNoThumbnailL(i);
+        for( TInt i = aBufferEnd; i >= aBufferStart; i-- )
+			{
+			// Just get the exiting item and update the fields + icon.
+			CHgItem* item = NULL;
+			if( iMediaWall )
+				item = &iMediaWall->ItemL(i);
+			else
+				item = &iListWidget->ItemL(i);
+
+			index = MediaIndex(i);
+			if ( index >= 0 )
+				{
+				CMPXMedia* currentMedia( mediaArray.AtL( index ) );
+				AddThumbnailToDisplayedItemL( item, currentMedia, index );
+				}
+			else
+				{
+				if ( iCurrentViewType == EMPXViewMediawall ||
+					 iCurrentViewType == EMPXViewList && (i-iShuffleItem) == -1 )
+					SetDetailIconShuffleL();
+				iThumbnailReqMap[i] = ETrue;
+				RefreshNoThumbnailL(i);
+				}
 			}
-        }
+		}
+	else
+		{
+		for( TInt i = aBufferStart; i <= aBufferEnd; i++ )
+			{
+			// Just get the exiting item and update the fields + icon.
+			CHgItem* item = NULL;
+			if( iMediaWall )
+				item = &iMediaWall->ItemL(i);
+			else
+				item = &iListWidget->ItemL(i);
+
+			index = MediaIndex(i);
+			if ( index >= 0 )
+				{
+				CMPXMedia* currentMedia( mediaArray.AtL( index ) );
+				AddThumbnailToDisplayedItemL( item, currentMedia, index );
+				}
+			else
+				{
+				if ( iCurrentViewType == EMPXViewMediawall ||
+					 iCurrentViewType == EMPXViewList && (i-iShuffleItem) == -1 )
+					SetDetailIconShuffleL();
+				iThumbnailReqMap[i] = ETrue;
+				RefreshNoThumbnailL(i);
+				}
+			}
+		}
     }
 
 // -----------------------------------------------------------------------------
@@ -3714,7 +3754,12 @@
 
         MPX_DEBUG_PATH(*cpath);
 
-        if (cpath->Levels() == 3)
+		if ( 2 == cpath->Levels())
+            {
+            cpath->Back();
+            cpath->AppendL(3);
+            }
+        else if (cpath->Levels() == 3)
 			{
 			// go back one level before amending path with new levels
 			cpath->Back();
@@ -3846,7 +3891,13 @@
 	CleanupStack::PushL( cpath );
 
 	MPX_DEBUG_PATH(*cpath);
-	if (cpath->Levels() == 3)
+
+    if ( 2 == cpath->Levels())
+        {
+        cpath->Back();
+        cpath->AppendL(3);
+        }
+	else if (cpath->Levels() == 3)
 		{
 		// go back one level before amending path with new levels
 		cpath->Back();
@@ -4249,7 +4300,7 @@
 
     listBox->ConstructL( dialog,
             EAknListBoxSelectionList | EAknListBoxScrollBarSizeExcluded  );
-	
+
 
     listBox->CreateScrollBarFrameL( ETrue );
     listBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
@@ -4567,7 +4618,20 @@
     CMPXCollectionViewHgContainer* self = static_cast<CMPXCollectionViewHgContainer*>(aPtr);
     if( self )
         {
+        //check if the pointer to ContainerMedia exists
+        const CMPXMedia& media = self->iListBoxArray->ContainerMedia();    
+        if ( NULL == &media )
+    	    {
+            return KErrNone;
+    	    }  
+
+
         self->HandleLbxItemAdditionL();
+
+        if( self->iCbaHandler )
+            { 
+            self->iCbaHandler->UpdateCba();
+            }
         }
     return KErrNone;
     }
@@ -4708,7 +4772,7 @@
         TInt resId = R_MPX_COLLECTION_ALBUM_LBX_EMPTYTEXT;
         HBufC* emptyText = StringLoader::LoadLC( resId );
         SetLbxEmptyTextL( *emptyText );
-        CleanupStack::PopAndDestroy( emptyText );        
+        CleanupStack::PopAndDestroy( emptyText );
         }
     }
 
@@ -4746,7 +4810,9 @@
         iTranstionType = EMPXTranstionNotDefined;
         return;
         }
-    else if( iCurrentViewType == EMPXViewTBone )
+    else if( iContext == EContextItemAlbum ||
+             iContext == EContextItemGenre ||
+             iContext == EContextItemPlaylist )
         {
         iTranstionType = EMPXTranstionToRight;
         }
@@ -4755,6 +4821,9 @@
         {
         iMediaWall->SetFlags( CHgVgMediaWall::EHgVgMediaWallDrawToWindowGC );
         iMediaWall->DrawNow();
+		// workaround for NGA animations: includes Media Wall into transition animation.
+		iCoeEnv->WsSession().Finish();
+		User::After(1000);
         }
 
     const TInt flags = AknTransEffect::TParameter::EActivateExplicitCancel;
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -37,8 +37,8 @@
 #include <sendui.h>
 #include <CMessageData.h>
 #include <centralrepository.h>
-#include <mprofileengine.h>
-#include <akndlgshut.h>
+#include <MProfileEngine.h>
+#include <AknDlgShut.h>
 #ifdef RD_MULTIPLE_DRIVE
 #include <driveinfo.h>
 #endif //RD_MULTIPLE_DRIVE
@@ -48,9 +48,9 @@
 
 #include <mediarecognizer.h>
 #include <featmgr.h>
-#include <aknmediatorfacade.h>
+#include <AknMediatorFacade.h>
 #include <MediatorCommandInitiator.h>
-#include <mediatordomainuids.h>
+#include <MediatorDomainUIDs.h>
 
 #include <mplayersecondarydisplayapi.h>
 #include <data_caging_path_literals.hrh>
@@ -130,7 +130,6 @@
 const TInt KIncrementalDelayHalfSecond = 1000000;
 const TInt KIncrementalFetchBlockSize = 400;
 const TInt KIncrementalDirectionCount = 8;
-const TInt KProgressBarMaxValue = 100;  // Max Value for the Progress Info bar
 const TInt KWaitNoteImpUid = 0x101FFC6C; // refresh wait note UID
 #ifdef __ENABLE_PODCAST_IN_MUSIC_MENU
 const TInt KMusicMenuPodcastMenuItemIndex = 4; // podcast menu item index
@@ -287,7 +286,10 @@
         AppUi()->RemoveFromStack( iContainer );
         delete iContainer;
         }
-
+    if( iTitleWait )
+	    {
+	    delete iTitleWait;
+		}
     delete iUserPlaylists;
     delete iCommonUiHelper;
     delete iSendUi;
@@ -322,7 +324,9 @@
     iCurrentHighlightedIndex( KErrNotFound ),
     iCachedCommand( KErrNotFound ),
     iNoteType( EMPXNoteNotDefined ),
-	iFirstIncrementalBatch( ETrue )
+	iFirstIncrementalBatch( ETrue ),
+	iDialogDismissed( EFalse ),
+	iTitleWait( NULL )
 	{
     MPX_FUNC( "CMPXCollectionViewHgImp::CMPXCollectionViewHgImp" );
     iUsingNokiaService = EFalse;
@@ -626,9 +630,6 @@
     if ( !isIgnore  && iCollectionReady )
         {
         CMPXCommonListBoxArrayBase* listboxArray( iContainer->ListBoxArray() );
-        const CMPXMedia& containerMedia( listboxArray->ContainerMedia() );
-        
-        const TMPXItemId containerId = containerMedia.ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
 
         HBufC* promptTxt( NULL );
         HBufC* waitNoteText( NULL );
@@ -657,7 +658,12 @@
                 const TDesC& trackTitle( albumTrack->ValueText( KMPXMediaGeneralTitle ) );
                 // create the item path to delete
 
-                 if ( path->Levels() == 3 )
+                if ( 2 == path->Levels() )
+                    {
+                    path->Back();
+                    path->AppendL(3);
+                    }
+                 else if ( path->Levels() == 3 )
 					{
 					path->Back();
 					}
@@ -667,9 +673,15 @@
 					path->Back();
 					}
 
-
-                 path->AppendL(containerId);
-                 path->AppendL(trackId);
+                TInt currentIndex( iContainer->CurrentLbxItemIndex() );
+                const CMPXMediaArray& albums = listboxArray->MediaArray();
+                CMPXMedia* album( albums.AtL( currentIndex ) );
+                const TMPXItemId albumId = album->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
+
+                path->AppendL(albumId);
+                path->AppendL(trackId);
+                 
+                MPX_DEBUG_PATH(*path);
 
                 waitNoteText = StringLoader::LoadLC(
                     R_MPX_QTN_ALBUM_WAITING_DELETING, trackTitle );
@@ -703,6 +715,9 @@
                     if(iCachedCommand != aCommand)
                         {
                         iIsWaitNoteCanceled = EFalse;
+                        StartDeleteWaitNoteL();
+                        TPtr buf = waitNoteText->Des();
+                        UpdateProcessL( buf );
                         }
                     if ( !iIsWaitNoteCanceled )
                         {
@@ -798,13 +813,36 @@
         // Create a copy of collection path
         CMPXCollectionPath* path( iCollectionUtility->Collection().PathL() );
         CleanupStack::PushL( path );
+        
+        if ( 2 == path->Levels() )
+             {
+             path->Back();
+             path->AppendL(3);
+             
+             const CMPXMediaArray& albums = listboxArray->MediaArray();
+             
+             RArray<TMPXItemId> ids;
+             CleanupClosePushL(ids);
+
+             TInt albumCount = albums.Count();
+              for (TInt i=0; i<albumCount; ++i)
+                  {
+                  CMPXMedia* album = albums.AtL(i);
+                  const TMPXItemId id = album->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
+                  ids.AppendL(id);
+                  }
+              path->AppendL(ids.Array()); // top level items
+              ids.Reset();
+              path->Set(currentIndex);
+              CleanupStack::PopAndDestroy(&ids);             
+             }
+        MPX_DEBUG_PATH(*path);
+        
         HBufC* promptTxt( NULL );
         HBufC* waitNoteText( NULL );
         TInt waitNoteCBA( R_AVKON_SOFTKEYS_EMPTY );
         MPX_DEBUG2( "CMPXCollectionViewHgImp::DeleteSelectedItemsL delete array count = %d", arrayCount );
 
-        // delete single song, not show wait note
-        TBool singleSong( EFalse );
         TMPXGeneralType containerType(
             containerMedia.ValueTObjectL<TMPXGeneralType>(
                 KMPXMediaGeneralType ) );
@@ -906,11 +944,6 @@
                 if ( ( type == EMPXItem && category == EMPXSong ) ||
                     ( type == EMPXItem && category == EMPXPlaylist ) )
                     {
-                    // delete single song
-                    if ( type == EMPXItem && category == EMPXSong )
-                        {
-                        singleSong = ETrue;
-                        }
                     // tracks level, or deleting a playlist
                     waitNoteText = StringLoader::LoadLC(
                         R_MPX_QTN_ALBUM_WAITING_DELETING, title );
@@ -1029,13 +1062,9 @@
             if(iCachedCommand != aCommand)
                 {
                 iIsWaitNoteCanceled = EFalse;
-                // If delete one song, don't show progress note.
-                if ( !singleSong )
-                    {
-                    StartProgressNoteL();
-                    TPtr buf = waitNoteText->Des();
-                    UpdateProcessL(0, buf);
-                    }
+                StartDeleteWaitNoteL();
+				TPtr buf = waitNoteText->Des();
+				UpdateProcessL( buf );
                 }
 
                 if ( !iIsWaitNoteCanceled )
@@ -1390,31 +1419,29 @@
     }
 
 // ---------------------------------------------------------------------------
-// Start a Progress note
+// Start a Wait note
 // ---------------------------------------------------------------------------
 //
-void CMPXCollectionViewHgImp::StartProgressNoteL()
+void CMPXCollectionViewHgImp::StartDeleteWaitNoteL()
     {
-    iProgressDialog = new (ELeave) CAknProgressDialog(
-        (REINTERPRET_CAST(CEikDialog**, &iProgressDialog)),
+    iWaitDialog = new (ELeave) CAknWaitDialog(
+        (REINTERPRET_CAST(CEikDialog**, &iWaitDialog)),
         ETrue);
-    iProgressDialog->PrepareLC(R_MPX_PROGRESS_NOTE);
-    iProgressInfo = iProgressDialog->GetProgressInfoL();
-    iProgressDialog->SetCallback(this);
-    iProgressDialog->RunLD();
-    iProgressInfo->SetFinalValue(KProgressBarMaxValue);
+    iWaitDialog->PrepareLC(R_MPX_WAIT_NOTE);
+
+    iWaitDialog->SetCallback(this);
+    iWaitDialog->RunLD();
     }
 
 // ---------------------------------------------------------------------------
 // Update the Progress note
 // ---------------------------------------------------------------------------
 //
-void CMPXCollectionViewHgImp::UpdateProcessL( TInt aProgress, const TDesC& aProgressText )
+void CMPXCollectionViewHgImp::UpdateProcessL( const TDesC& aProgressText )
     {
-    if ( iProgressDialog )
-        {
-        iProgressDialog->SetTextL(aProgressText);
-        iProgressInfo->SetAndDraw(aProgress);
+    if ( iWaitDialog )
+        {
+        iWaitDialog->SetTextL(aProgressText);
         }
     }
 
@@ -2743,11 +2770,16 @@
         else
             {
             //single selection
-            isHidden = array->IsItemBrokenLinkL(
-                iContainer->CurrentLbxItemIndex() );
-            isHidden = isHidden ||
-                array->IsItemCorruptedL(
-                iContainer->CurrentLbxItemIndex() );
+            TInt currentIndex( iContainer->CurrentLbxItemIndex() );
+            if( currentIndex > KErrNotFound )
+                {   
+                isHidden = array->IsItemBrokenLinkL( currentIndex );
+                isHidden = isHidden || array->IsItemCorruptedL( currentIndex );
+                }
+			else
+                {
+                isHidden = ETrue;
+                }	
             }
         }
 
@@ -2896,9 +2928,17 @@
     
     CMPXMedia* albumTrack = iContainer->SelectedItemMediaL();
     TMPXItemId trackId = albumTrack->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
-
-    path->Back();
-    path->Back();
+    // create the item path to send
+
+    if ( path->Levels() == 3 ) //TBone album level
+        {
+        path->Back();  
+        }
+    else if (path->Levels() == 4) //TBone Song Node level
+        {
+        path->Back();
+        path->Back();
+        }
     path->AppendL(aContainerId);
     path->AppendL(trackId); 
 
@@ -3674,6 +3714,7 @@
     {
     MPX_FUNC( "CMPXCollectionViewHgImp::HandleAddCompletedL" );
     iAddingToNewPlaylist = EFalse;
+    iDialogDismissed = EFalse;
     iCommonUiHelper->DismissWaitNoteL();
     HandleCommandL( EMPXCmdHandleExternalCommand );
     if ( aError == KErrNone )
@@ -3686,45 +3727,16 @@
         MPX_DEBUG2( "CMPXCollectionViewHgImp::HandleAddCompletedL iPlaylistId = 0x%x", iPlaylistId.iId1 );
         if ( iCurrentPlaylistOp != EMPXOpPLCreating )
             {
-            HBufC* confirmTxt( NULL );
-            const TDesC& title( aPlaylist->ValueText( KMPXMediaGeneralTitle ) );
-            TMPlayerSecondaryDisplayNote noteId( EMPlayerNoteNone );
-            if ( iNumSongAddedToPlaylist > 1 )
-                {
-                confirmTxt = StringLoader::LoadLC(
-                    R_MPX_QTN_MUS_MULTIPLE_TRACKS_ADDED_TO_PL,
-                    title, iNumSongAddedToPlaylist );
-                noteId = EMPlayerNoteAddManySongToPlaylist;
-                }
-            else
-                {
-                confirmTxt = StringLoader::LoadLC(
-                    R_MPX_QTN_MUS_NOTE_TRACK_ADDED_TO_PL, title );
-                noteId = EMPlayerNoteAddSongToPlaylist;
-                }
-
-            CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote();
-
-            note->PublishDialogL(
-                noteId,
-                KMPlayerNoteCategory );
-
-            if ( iCoverDisplay )
-                {
-                CAknMediatorFacade* covercl = AknMediatorFacade( note );
-                if ( covercl )
-                    {
-                    covercl->BufStream() << title;
-                    if ( iNumSongAddedToPlaylist > 1 )
-                        {
-                        covercl->BufStream().WriteInt32L( iNumSongAddedToPlaylist );
-                        }
-                    }
-                }
-
-            note->ExecuteLD( *confirmTxt );
-            CleanupStack::PopAndDestroy( confirmTxt );
-
+            if( !iTitleWait )
+                {
+                delete iTitleWait;
+                iTitleWait = NULL;
+                }
+            iTitleWait = aPlaylist->ValueText( KMPXMediaGeneralTitle ).AllocL();
+            if( iDialogDismissed )
+                {
+                ShowAddedItemsDialogL();
+                }
             }
         else // iCurrentPlaylistOp == EMPXOpPLCreating
             {
@@ -3747,6 +3759,57 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// Shows the added items dialog
+// ---------------------------------------------------------------------------
+//
+void CMPXCollectionViewHgImp::ShowAddedItemsDialogL()
+    {
+    HBufC* confirmTxt( NULL );
+    
+    TMPlayerSecondaryDisplayNote noteId( EMPlayerNoteNone );
+    if ( iNumSongAddedToPlaylist > 1 )
+        {
+        
+        confirmTxt = StringLoader::LoadLC(
+            R_MPX_QTN_MUS_MULTIPLE_TRACKS_ADDED_TO_PL,
+            iTitleWait->Des(), iNumSongAddedToPlaylist );
+        noteId = EMPlayerNoteAddManySongToPlaylist;
+        }
+    else
+        {
+        confirmTxt = StringLoader::LoadLC(
+            R_MPX_QTN_MUS_NOTE_TRACK_ADDED_TO_PL, iTitleWait->Des() );
+        noteId = EMPlayerNoteAddSongToPlaylist;
+        }
+    
+    CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote();
+
+    note->PublishDialogL(
+        noteId,
+        KMPlayerNoteCategory );
+
+    if ( iCoverDisplay )
+        {
+        CAknMediatorFacade* covercl = AknMediatorFacade( note );
+        if ( covercl )
+            {
+            covercl->BufStream() << iTitleWait;
+            if ( iNumSongAddedToPlaylist > 1 )
+                {
+                covercl->BufStream().WriteInt32L( iNumSongAddedToPlaylist );
+                }
+            }
+        }
+    note->ExecuteLD( *confirmTxt );
+    CleanupStack::PopAndDestroy( confirmTxt );
+	if( iTitleWait )
+	    {
+	    delete iTitleWait;
+	    iTitleWait = NULL;
+		}
+    }
+
 // -----------------------------------------------------------------------------
 // Handles the completion of setting a media event.
 // -----------------------------------------------------------------------------
@@ -4092,6 +4155,7 @@
 //
 void CMPXCollectionViewHgImp::DialogDismissedL( TInt aButtonId )
     {
+    iDialogDismissed = ETrue;
     MPX_FUNC( "CMPXCollectionViewHgImp::DialogDismissedL" );
     if ( iCommandInitiator )
         {
@@ -4127,6 +4191,15 @@
                 }
             break;
             }
+        case EAknSoftkeyDone:
+            {
+            // Double check that we should be showing the dialog
+            if( iTitleWait )
+                {
+                ShowAddedItemsDialogL();
+                }
+            break;
+            }
         default:
             {
             // no special handling for other cases
@@ -4515,9 +4588,9 @@
         {
         // nothing else to delete
         iIsDeleting = EFalse;
-        if ( iProgressDialog )
-            {
-            iProgressDialog->ProcessFinishedL();
+        if ( iWaitDialog )
+            {
+            iWaitDialog->ProcessFinishedL();
             }
         HandleCommandL( EMPXCmdHandleExternalCommand );
         }
@@ -4891,9 +4964,9 @@
                     {
                     // only dismiss wait note if the wait note is not
                     // canceled
-                    if ( iProgressDialog )
+                    if ( iWaitDialog )
                         {
-                        iProgressDialog->ProcessFinishedL();
+                        iWaitDialog->ProcessFinishedL();
                         }
                     HandleCommandL( EMPXCmdHandleExternalCommand );
                     iIsWaitNoteCanceled = EFalse;
@@ -4916,9 +4989,9 @@
                 iIsDeleting = EFalse;
                 if ( !iIsWaitNoteCanceled )
                     {
-                    if ( iProgressDialog )
+                    if ( iWaitDialog )
                     	{
-						iProgressDialog->ProcessFinishedL();
+						iWaitDialog->ProcessFinishedL();
 						}
                     HandleCommandL( EMPXCmdHandleExternalCommand );
                     iIsWaitNoteCanceled = EFalse;
@@ -5028,27 +5101,6 @@
                 }
             break;
             }
-        case EDeleteStatusOp:
-            {
-            if ( aArgument )
-                {
-                CMPXMedia* media = (CMPXMedia*)aArgument;
-                CleanupStack::PushL( media );
-                if ( media->IsSupported( KMPXMediaGeneralCount ) )
-                    {
-                    TInt deletePercent = media->ValueTObjectL<TInt>( KMPXMediaGeneralCount );
-                    MPX_DEBUG2( "CMPXCollectionViewHgImp::HandleOperationCompleteL % Files Deleted: %d", deletePercent );
-                    // update WaitNote dialog.
-                    HBufC* string = StringLoader::LoadLC(R_MPX_QTN_NMP_DEL_BATCH_SONGS_WAIT_NOTE, deletePercent);
-                    TPtr buf = string->Des();
-                    UpdateProcessL(deletePercent, buf);
-                    CleanupStack::PopAndDestroy( string );
-                    }
-                CleanupStack::PopAndDestroy( media );
-                aArgument = NULL;
-                }
-            break;
-            }
         default:
             {
             break;
@@ -5447,6 +5499,28 @@
                     }
                 CMPXCollectionPath* path = iCollectionUtility->Collection().PathL();
                 CleanupStack::PushL( path );
+                
+                if ( 2 == path->Levels() )
+                     {
+                     path->Back();
+                     path->AppendL(3);
+                     
+                     const CMPXMediaArray& albums = listboxArray->MediaArray();
+                     
+                     RArray<TMPXItemId> ids;
+                     CleanupClosePushL(ids);
+
+                     TInt albumCount = albums.Count();
+                      for (TInt i=0; i<albumCount; ++i)
+                          {
+                          CMPXMedia* album = albums.AtL(i);
+                          const TMPXItemId id = album->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
+                          ids.AppendL(id);
+                          }
+                      path->AppendL(ids.Array()); // top level items
+                      ids.Reset();
+                      CleanupStack::PopAndDestroy(&ids);             
+                     }
                 path->Set( iContainer->CurrentLbxItemIndex() );
                 RArray<TMPXAttribute> attrs;
                 CleanupClosePushL( attrs );
@@ -6068,7 +6142,17 @@
 			
 	TMPXGeneralType containerType(
     	containerMedia.ValueTObjectL<TMPXGeneralType>( KMPXMediaGeneralType ) );			
-
+    
+	TInt usbUnblockingStatus;
+    RProperty::Get( KMPXViewPSUid,
+                    KMPXUSBUnblockingPSStatus,
+                    usbUnblockingStatus);
+   
+   if(usbUnblockingStatus)
+       {
+       aMenuPane->SetItemDimmed( EMPXCmdRefreshLibrary, ETrue );
+       }
+   
 	switch ( containerCategory )
 		{
 		case EMPXPlaylist:
@@ -6177,36 +6261,24 @@
 				aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue );
 				aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue );
 				aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue );
+                aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue );
 
 				TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();
-				if ( landscapeOrientation )
+				if ( !landscapeOrientation )
 					{
-					aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue );
-					}
-				else
-					{
-					aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue );
-                    aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue );
-                    aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue );
-					aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue );
-
 					TInt usbUnblockingStatus;
 					RProperty::Get( KMPXViewPSUid,
 									KMPXUSBUnblockingPSStatus,
 									usbUnblockingStatus);
 
-					if ( iContainer->CurrentLbxItemIndex() > KErrNotFound )
+					if ( iContainer->CurrentLbxItemIndex() > KErrNotFound && !iContainer->IsTBoneView())
 					    {
                         if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive )
                             {
@@ -6217,9 +6289,7 @@
                             {
                             aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, EFalse );
                             aMenuPane->SetItemDimmed( EMPXCmdDelete, EFalse );
-                            aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue );
-                            aMenuPane->SetItemDimmed( EMPXCmdPlayItem,
-                                    iContainer->IsTBoneView() ? ETrue : EFalse );
+                            aMenuPane->SetItemDimmed( EMPXCmdPlayItem, EFalse );
                             }
 					    }
 					if ( iContainer->IsSelectedItemASong() && iContainer->IsTBoneView() )
@@ -6233,19 +6303,20 @@
 							{
 							aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, EFalse );
 							aMenuPane->SetItemDimmed( EMPXCmdDelete, EFalse );
+							aMenuPane->SetItemDimmed( EMPXCmdSend, EFalse );
 							}
 						}
+					}
 					
-					//If Operator Music store exist, show the cascade menu with Nokia and Operator music store.
-					if ( iOperatorMusicStore )
-					    {
-					    aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, ETrue);
-					    }
-					else
-					    {
-					    aMenuPane->SetItemDimmed(EMPXCmdGoToMultipleMusicShop, ETrue);
-					    }
-					}
+				//If Operator Music store exist, show the cascade menu with Nokia and Operator music store.
+				if ( iOperatorMusicStore )
+				    {
+				    aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, ETrue);
+				    }
+				else
+				    {
+				    aMenuPane->SetItemDimmed(EMPXCmdGoToMultipleMusicShop, ETrue);
+				    }
 				}
 
 			break;
@@ -6323,34 +6394,35 @@
 				}
 
 			TInt currentItem( iContainer->CurrentLbxItemIndex() );
-
-			CMPXCollectionViewListBoxArray* array =
-				static_cast<CMPXCollectionViewListBoxArray*>(
-				iContainer->ListBoxArray() );
-			const CMPXMedia& media = array->MediaL( currentItem );
-
-			if ( media.IsSupported( KMPXMediaGeneralNonPermissibleActions ) )
-				{
-				// check for auto playlist, disable delete
-				TMPXGeneralNonPermissibleActions attr(
-					media.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
-						KMPXMediaGeneralNonPermissibleActions ) );
-				if ( attr & EMPXWrite )
-					{
-					aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue );
-					}
-				}
-
-			TInt trackCount (0);
-			if( media.IsSupported(KMPXMediaGeneralCount) )
-				{
-				trackCount = media.ValueTObjectL<TInt>( KMPXMediaGeneralCount );
-				}
-			if( trackCount < 1 )
-				{
-				aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue );
-				}
-
+			if(currentItem > KErrNotFound )
+			    {  
+			    CMPXCollectionViewListBoxArray* array =
+			    static_cast<CMPXCollectionViewListBoxArray*>(
+			            iContainer->ListBoxArray() );
+			    const CMPXMedia& media = array->MediaL( currentItem );
+
+			    if ( media.IsSupported( KMPXMediaGeneralNonPermissibleActions ) )
+			        {
+			        // check for auto playlist, disable delete
+			        TMPXGeneralNonPermissibleActions attr(
+			                media.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
+			                        KMPXMediaGeneralNonPermissibleActions ) );
+			        if ( attr & EMPXWrite )
+			            {
+			            aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue );
+			            }
+			        }
+
+			    TInt trackCount (0);
+			    if( media.IsSupported(KMPXMediaGeneralCount) )
+			        {
+			        trackCount = media.ValueTObjectL<TInt>( KMPXMediaGeneralCount );
+			        }
+			    if( trackCount < 1 )
+			        {
+			        aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue );
+			        }
+			    } 
 			if ( iOperatorMusicStore )
 			    {
 			    aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, ETrue);
@@ -6372,47 +6444,49 @@
 			aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue );
 
 			TInt currentItem( iContainer->CurrentLbxItemIndex() );
-
-			CMPXCollectionViewListBoxArray* array =
-				static_cast<CMPXCollectionViewListBoxArray*>(
-				iContainer->ListBoxArray() );
-			const CMPXMedia& media = array->MediaL( currentItem );
-
-			TInt usbUnblockingStatus;
-			RProperty::Get( KMPXViewPSUid,
-							KMPXUSBUnblockingPSStatus,
-							usbUnblockingStatus);
-			if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive )
-				{
-				aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
-				}
-			else
-				{
-				aMenuPane->SetItemDimmed( EMPXCmdRename, EFalse );
-				}
-
-			if ( media.IsSupported(
-				KMPXMediaGeneralNonPermissibleActions ) )
-				{
-				// check for auto playlist, disable delete
-				TMPXGeneralNonPermissibleActions attr(
-					media.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
-						KMPXMediaGeneralNonPermissibleActions ) );
-				if ( attr & EMPXWrite )
-					{
-					aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
-					// TODO: this should be an item specific command.
-					aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue );
-					}
-				}
-			if ( array->IsItemBrokenLinkL( currentItem ) ||
-				array->IsItemCorruptedL( currentItem ) )
-				{
-				aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
-                // TODO: this should be an item specific command.
-				aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue );
-				}
-
+            
+			if(currentItem > KErrNotFound )
+			    {  
+			    CMPXCollectionViewListBoxArray* array =
+			    static_cast<CMPXCollectionViewListBoxArray*>(
+			            iContainer->ListBoxArray() );
+			    const CMPXMedia& media = array->MediaL( currentItem );
+
+			    TInt usbUnblockingStatus;
+			    RProperty::Get( KMPXViewPSUid,
+			            KMPXUSBUnblockingPSStatus,
+			            usbUnblockingStatus);
+			    if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive )
+			        {
+			        aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
+			        }
+			    else
+			        {
+			        aMenuPane->SetItemDimmed( EMPXCmdRename, EFalse );
+			        }
+
+			    if ( media.IsSupported(
+			            KMPXMediaGeneralNonPermissibleActions ) )
+			        {
+			        // check for auto playlist, disable delete
+			        TMPXGeneralNonPermissibleActions attr(
+			                media.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
+			                        KMPXMediaGeneralNonPermissibleActions ) );
+			        if ( attr & EMPXWrite )
+			            {
+			            aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
+			            // TODO: this should be an item specific command.
+			            aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue );
+			            }
+			        }
+			    if ( array->IsItemBrokenLinkL( currentItem ) ||
+			            array->IsItemCorruptedL( currentItem ) )
+			        {
+			        aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue );
+			        // TODO: this should be an item specific command.
+			        aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue );
+			        }
+			    } 
 			break;
 			}
         default:
@@ -6731,27 +6805,26 @@
 						aMenuPane->SetItemDimmed( EMPXCmdRemove, EFalse );
 						}
 					}
-
-				CMPXCollectionViewListBoxArray* array =
-					static_cast<CMPXCollectionViewListBoxArray*>(
-					iContainer->ListBoxArray() );
-				const CMPXMedia& containerMedia = array->ContainerMedia();
-
-				if ( containerMedia.IsSupported( KMPXMediaGeneralNonPermissibleActions ) )
-					{
-					// check for auto playlist, disable add, remove and reorder
-					TMPXGeneralNonPermissibleActions attr(
-						containerMedia.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
-							KMPXMediaGeneralNonPermissibleActions ) );
-					if ( attr & EMPXWrite )
-						{
-						aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue );
-						aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue );
-						aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue );
-						}
-					}
-				}
-
+				} 
+
+            CMPXCollectionViewListBoxArray* array =
+            static_cast<CMPXCollectionViewListBoxArray*>(
+                    iContainer->ListBoxArray() );
+            const CMPXMedia& containerMedia = array->ContainerMedia();
+
+            if ( containerMedia.IsSupported( KMPXMediaGeneralNonPermissibleActions ) )
+                {
+                // check for auto playlist, disable add, remove and reorder
+                TMPXGeneralNonPermissibleActions attr(
+                        containerMedia.ValueTObjectL<TMPXGeneralNonPermissibleActions>(
+                                KMPXMediaGeneralNonPermissibleActions ) );
+                if ( attr & EMPXWrite )
+                    {
+                    aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue );
+                    aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue );
+                    aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue );
+                    }
+                }
 			break;
 			}
 
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgtnloader.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgtnloader.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -82,7 +82,7 @@
         if( index >= 0 && iLoading[0]->iId == 0)
             {
             CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(iLoading[0]->iFileName, KMPXAlbumMimeType);
-            TRAPD(err, iLoading[0]->iId = iTnEngine->GetThumbnailL( *source, NULL, 0 ); )
+            TRAPD(err, iLoading[0]->iId = iTnEngine->GetThumbnailL( *source, NULL, 1 ); )
         	MPX_DEBUG4( "GetThumbnailL: %d [%d,%d]", err, index, iLoading[0]->iId);
 			CleanupStack::PopAndDestroy(source);
             }
@@ -144,7 +144,7 @@
     iTnEngine->SetQualityPreferenceL( CThumbnailManager::EOptimizeForQuality );
     iTnEngine->SetThumbnailSizeL( iSize );
     TCallBack callback(CMpxTNLoader::LoadThumbnail, this);
-    iAsyncCallBack = new (ELeave) CAsyncCallBack( CActive::EPriorityStandard );
+    iAsyncCallBack = new (ELeave) CAsyncCallBack( CActive::EPriorityHigh );
     iAsyncCallBack->Set(callback);
     iPauseTimer = CPeriodic::NewL( CActive::EPriorityStandard  );
     }
--- a/mpxplugins/viewplugins/views/commoncontainer/src/mpxcommonlistboxarraybase.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/commoncontainer/src/mpxcommonlistboxarraybase.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -80,8 +80,11 @@
 EXPORT_C void CMPXCommonListBoxArrayBase::AppendMediaL( const CMPXMedia& aMedia )
     {
     MPX_FUNC( "CMPXCommonListBoxArrayBase::AppendMediaL" );
-    delete iContainerMedia;
-    iContainerMedia=NULL;
+    if ( NULL != iContainerMedia )
+        {
+        delete iContainerMedia;
+        iContainerMedia=NULL;
+        }
     iContainerMedia=CMPXMedia::NewL(aMedia);
     iMedia=const_cast<CMPXMediaArray*>(iContainerMedia->Value<CMPXMediaArray>( KMPXMediaArrayContents ) );
     MPX_DEBUG2( "CMPXCommonListBoxArrayBase::AppendMediaL media count %d", iMedia->Count() );
@@ -95,8 +98,11 @@
 EXPORT_C void CMPXCommonListBoxArrayBase::ResetMediaArrayL()
     {
     MPX_FUNC( "CMPXCommonListBoxArrayBase::ResetMediaArray" );
-    delete iContainerMedia;
-    iContainerMedia = NULL;
+    if ( NULL != iContainerMedia )
+        {
+        delete iContainerMedia;
+        iContainerMedia = NULL;
+        }
     iMedia = NULL;
     iIndex = KErrNotFound;
     iPbState = EPbStateNotInitialised;
--- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewcontainer.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewcontainer.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -56,7 +56,7 @@
 #include <mpxinternalcrkeys.h>
 #include <touchfeedback.h>
 #include <akntranseffect.h>                 // For transition effects
-#include <gfxtranseffect\gfxtranseffect.h>  // For transition effects
+#include <gfxtranseffect/gfxtranseffect.h>  // For transition effects
 
 #include "mpxcommonplaybackviewcontainer.h"
 #include "mpxcommonplaybackviewlayout.h"
@@ -182,7 +182,7 @@
 
     iLightStatus = CHWRMLight::ELightStatusUnknown;
     iIsForeground = EFalse ;
-    iLight = CHWRMLight::NewL(this); 
+    iLight = CHWRMLight::NewL(this);
 
 	DrawableWindow()->SetPointerGrab( ETrue );
     EnableDragEvents();
@@ -210,7 +210,7 @@
     delete iCommonUiHelper;
 
     if ( iLight )
-        {        
+        {
         delete iLight;
         iLight = NULL;
         }
@@ -719,7 +719,7 @@
         iTrackAlbumArt = aBitmap;
         }
 
-    DrawDeferred(); 
+    DrawDeferred();
     //Window().Invalidate( iAlbumArtRect );
     //Window().Invalidate( iSliderPaneRect );
     }
@@ -1020,27 +1020,16 @@
             {
             if ( iTrackAlbumArt )
                 {
-                // Calculating the CenterPoint for Drawing the albumart image 
-                TSize bmpSizeInPixels = iTrackAlbumArt->SizeInPixels();
-                TInt xPos = ( iAlbumArtRect.Width() - bmpSizeInPixels.iWidth )
-                        / 2;
-                TInt yPos =
-                        ( iAlbumArtRect.Height() - bmpSizeInPixels.iHeight )
-                                / 2;
-                TPoint Centerpos = TPoint(xPos, yPos );
-                // bitmap top left corner position
-                Centerpos += iAlbumArtRect.iTl;
-
                 // Draw album art and frame
-                gc.BitBlt( Centerpos, iTrackAlbumArt);
+                gc.DrawBitmap( iAlbumArtRect, iTrackAlbumArt, iTrackAlbumArt->SizeInPixels() );
+                
                 TRgb color = KRgbBlack;
                 AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors,
                         EAknsCIQsnTextColorsCG50 );
-                TRect imageRect( Centerpos, iTrackAlbumArt->SizeInPixels() );
                 gc.SetPenStyle( CGraphicsContext::ESolidPen );
                 gc.SetBrushStyle( CGraphicsContext::ENullBrush );
                 gc.SetPenColor( color );
-                gc.DrawRect( imageRect );
+                gc.DrawRect( iAlbumArtRect );                    
                 }
             else
                 {
@@ -1077,7 +1066,7 @@
 // ---------------------------------------------------------------------------
 // Update progress bar graphics and redraw.
 // Refresh happens only when backlight is ON and
-// the UI is in foreground. 
+// the UI is in foreground.
 // Note: Some display types may not need backlight. In that case
 // code may need to be adjusted accordingly.
 // ---------------------------------------------------------------------------
@@ -1141,7 +1130,7 @@
     else
         {
         background->SetBitmap( KAknsIIDQsnBgAreaMain );
-        background->SetRect( aRect );        
+        background->SetRect( aRect );
         }
 
     }
@@ -1189,7 +1178,7 @@
         {
         return 0;
         }
-   } 
+   }
 // ---------------------------------------------------------------------------
 // From CCoeControl
 // Gets an indexed component of a compound control.
@@ -1252,7 +1241,7 @@
             {
             case TPointerEvent::EButton1Down:
                 {
-                if ( iSliderPaneRect.Contains(aPointerEvent.iPosition) && 
+                if ( iSliderPaneRect.Contains(aPointerEvent.iPosition) &&
                         ( iMode == EPlayMode || iMode == EPauseMode ))
                     {
                     // Pointer events
@@ -1269,13 +1258,13 @@
                         EAspectRatioNotPreserved );
                     }
                 if ( iAlbumArtRect.Contains(aPointerEvent.iPosition ) )
-                    {                    
+                    {
                     MTouchFeedback* feedback = MTouchFeedback::Instance();
                     if (feedback)
                         {
                         feedback->InstantFeedback(ETouchFeedbackBasic);
-                        }                
-                 
+                        }
+
                     if ( iCommandObserver )
         								{
                         iCommandObserver->ProcessCommandL( EMPXCmdVolumeChanged );
@@ -1437,7 +1426,7 @@
         {
 		MPX_DEBUG2(" LightStatusChanged: (%d)", aStatus);
 		if ( ( aStatus == CHWRMLight::ELightOn || aStatus == CHWRMLight::ELightOff ) && aStatus != iLightStatus )
-	    	{	
+	    	{
 			iLightStatus = aStatus;
 			}
         }
@@ -1619,7 +1608,7 @@
 // CMPXCommonPlaybackViewContainer::ReStoreButtons
 // -----------------------------------------------------------------------------
 //
-void CMPXCommonPlaybackViewContainer::RestoreButtons( 
+void CMPXCommonPlaybackViewContainer::RestoreButtons(
     TMPXPlaybackState aState )
     {
     if ( iEnableButtons )
--- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -113,6 +113,7 @@
 const TUid KMPXEqualizerViewImplementationId = { 0x101FFC77 };
 const TInt KMPXPostponeForHandleDelayedError( 1000000 ); // 1S
 const TInt KMPXPlaybackViewWindowBackground = -1;
+const TInt KMPXDelayForTNRequest( 3000000 ); // 3S
 
 // for freqency display in the format of "XXX.XX"
 const TInt KMPXFMFreqWidth        = 6;
@@ -159,6 +160,9 @@
 _LIT(KMPXRnRealAudioMimeType, "audio/vnd.rn-realaudio");
 #endif
 
+#define THUMBNAIL_CENREP_UID 0x102830B0 // from thumbnailmanageruids.hrh
+const TUint32 KSizeAudioFullscreenWidth = 0x16;
+const TUint32 KSizeAudioFullscreenHeight = 0x17;
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -209,6 +213,15 @@
     CleanupStack::PopAndDestroy( repository );
     repository = NULL;
 
+    repository = CRepository::NewLC( TUid::Uid(THUMBNAIL_CENREP_UID));
+
+    TInt xSize( 0 );
+    TInt ySize( 0 );
+    User::LeaveIfError( repository->Get( KSizeAudioFullscreenWidth, xSize ));
+    User::LeaveIfError( repository->Get( KSizeAudioFullscreenHeight, ySize ));
+    iFullScreenImageSize.SetSize(xSize,ySize);
+    CleanupStack::PopAndDestroy( repository );
+    repository = NULL;
 
     iChangeRTForAllProfiles =
         static_cast<TBool>( flags & KMPXChangeRTForAll );
@@ -349,6 +362,8 @@
     iIsffButtonPressed = EFalse;
     iDelayedErrorTimer = CPeriodic::NewL( CActive::EPriorityStandard );
     iFmTxActivity = EFmTxStateUnknown;
+
+    iTNRequestTimer = CPeriodic::NewL( CActive::EPriorityStandard );
     }
 
 
@@ -462,6 +477,13 @@
     	}
 
     delete iOldUri;
+    
+    if ( iTNRequestTimer )
+        {
+        iTNRequestTimer->Cancel();
+        delete iTNRequestTimer;
+        }
+    
     MPX_DEBUG1( "CMPXCommonPlaybackViewImp::~CMPXCommonPlaybackViewImp exiting" );
     }
 
@@ -729,20 +751,32 @@
             const TDesC& album = aMedia->ValueText( KMPXMediaGeneralUri );
             if(!iOldUri || iOldUri->Compare(album)!= 0)
                 {
-
-                TRect albumArtRect(
-                        iLayout->IndicatorLayout(
-                                ClientRect(), EAlbumArtArea ) );
-
-            MPX_TRAP( err,
-                iMPXUtility->ExtractAlbumArtL(
+                // Request for pre-generated TN size
+                MPX_TRAP( err,
+                    iMPXUtility->ExtractAlbumArtL(
                     *aMedia,
                     *iContainer,
-                    albumArtRect.Size() ); );
-                delete iOldUri;
-                iOldUri = NULL;
-                iOldUri=album.AllocL();
+                    iFullScreenImageSize ); );
+
+                // cancel timer
+                if ( iTNRequestTimer->IsActive())
+                    {
+                    iTNRequestTimer->Cancel();
+                    }
+
+                if ( err == KErrNone )
+                    {
+                    // startup timer for updating album art with custom size
+                    TCallBack cb( HandleTNRequestForCustomSizeL, this );
+                    iTNRequestTimer->Start( KMPXDelayForTNRequest,
+                        KMPXDelayForTNRequest,
+                        cb );
+                    }  
                 }
+            
+            delete iOldUri;
+            iOldUri = NULL;
+            iOldUri = album.AllocL();
             }
 
         if (KErrNone != err )
@@ -2043,8 +2077,6 @@
                 if ( !iBacking )
                     {
                     // event not consumed by Back Stepping utility, handle here
-                    //
-                    // Status pane has to be modified before view gets deactivated
 
                     MMPXSource* source = iPlaybackUtility->Source();
                     if ( source )
@@ -2053,48 +2085,15 @@
                         if ( playlist )
                             {
                             CleanupStack::PushL( playlist );
-    						CMPXCollectionPath* browsePath( iCollectionUtility->Collection().PathL() );
-							CleanupStack::PushL( browsePath );
-					        MPX_DEBUG_PATH(*browsePath);
-
+    						
                             if ( playlist->Count() )
                                 {
-                                CMPXCollectionPath* pbPath =
-                                    CMPXCollectionPath::NewL( playlist->Path() );
+                                CMPXCollectionPath* pbPath = CMPXCollectionPath::NewL( playlist->Path() );
                                 CleanupStack::PushL( pbPath );
+                                pbPath->Back();
+                                iViewUtility->PushDefaultHistoryL();
                                 MPX_DEBUG_PATH(*pbPath);
-
-                                TInt playbackPathCount( pbPath->Levels() );
-                                // if both path are at the same level, we need to check further
-                                TBool isEqual( ETrue );
-                                if ( browsePath->Levels() == playbackPathCount )
-                                    {
-                                    // Check id at each level
-                                    for ( TInt i = 0; i < playbackPathCount - 1; i++ )
-                                        {
-                                        if ( browsePath->Id( i ) != pbPath->Id( i ) )
-                                            {
-                                            isEqual = EFalse;
-                                            break;
-                                            }
-                                        }
-                                    }
-                                else
-                                    {
-                                    isEqual = EFalse;
-                                    }
-
-                                if ( isEqual ) // if they're the same path
-									{
-									pbPath->Back();
-									iViewUtility->PushDefaultHistoryL();
-									iCollectionUtility->Collection().OpenL( *pbPath );
-									}
-								else // we want to reopen the browse path
-									{
-									browsePath->Back();
-									iCollectionUtility->Collection().OpenL( *browsePath );
-									}
+                                iCollectionUtility->Collection().OpenL( *pbPath );
                                 CleanupStack::PopAndDestroy( pbPath );
                                 }
                             else
@@ -2103,7 +2102,6 @@
                                 // music main menu? or change ui spec
                                 AppUi()->HandleCommandL( EAknSoftkeyBack );
                                 }
-                            CleanupStack::PopAndDestroy( browsePath );
                             CleanupStack::PopAndDestroy( playlist );
                             }
                         else
@@ -2115,7 +2113,7 @@
                         {
                         CMPXCollectionPath* cpath = iCollectionUtility->Collection().PathL();
                         CleanupStack::PushL( cpath );
-                        while ( cpath->Levels() > 1 )
+                        while ( cpath->Levels() > 2 )
                             {
                             cpath->Back();
                             }
@@ -2649,6 +2647,11 @@
         toolbar->MakeVisible(EFalse);
         AppUi()->RemoveFromStack( toolbar );
         }
+    
+    if ( iTNRequestTimer->IsActive())
+        {
+        iTNRequestTimer->Cancel();
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -2991,7 +2994,6 @@
 //
 EXPORT_C void CMPXCommonPlaybackViewImp::HandleLayoutChange()
     {
-    iContainer->ExtractAlbumArtCompleted( NULL, KErrNone );
     if (iContainer && !iSwitchingView)
         {
         if ( !Layout_Meta_Data::IsLandscapeOrientation() )
@@ -4000,4 +4002,56 @@
 
     return KErrNone;
     }
+
+// ---------------------------------------------------------------------------
+// Updates track's album art.
+// ---------------------------------------------------------------------------
+//
+TInt CMPXCommonPlaybackViewImp::HandleTNRequestForCustomSizeL( TAny* aPtr )
+    {
+    MPX_DEBUG1("CMPXCommonPlaybackViewImp::HandleTNRequestForCustomSizeL()");
+    
+    ASSERT( aPtr );
+    CMPXCommonPlaybackViewImp* pv = reinterpret_cast<CMPXCommonPlaybackViewImp*>( aPtr );
+    
+    ASSERT( pv->iOldUri );   
+    if ( pv->iContainer && !pv->iSwitchingView )
+        {
+        TInt err( KErrNone );      
+        if ( pv->iMedia && pv->iMedia->IsSupported(KMPXMediaGeneralUri) )
+            {
+            const TDesC& album = pv->iMedia->ValueText( KMPXMediaGeneralUri );
+
+            if ( pv->iOldUri->Compare( album ) == 0 )
+                { 
+                TRect albumArtRect(
+                        pv->iLayout->IndicatorLayout(
+                        pv->ClientRect(), EAlbumArtArea ) );
+                
+                // Request for custom TN size               
+                MPX_TRAP( err,
+                    pv->iMPXUtility->ExtractAlbumArtL(
+                    *pv->iMedia,
+                    *pv->iContainer,
+                    albumArtRect.Size() ); );                
+                }
+            }
+
+        if ( KErrNone != err )
+            {
+            // If error, show default album art
+            MPX_DEBUG2("CMPXCommonPlaybackViewImp::HandleTNRequestForCustomSizeL(): err = %d", err);
+            pv->iContainer->ExtractAlbumArtCompleted( NULL, KErrNone );
+            }
+        }
+    
+    // cancel timer
+    if ( pv->iTNRequestTimer->IsActive())
+        {
+        pv->iTNRequestTimer->Cancel();
+        }
+        
+    return KErrNone;
+    }
+    
 //  End of File
--- a/musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h	Mon Mar 15 12:40:11 2010 +0200
@@ -20,6 +20,7 @@
 #define C_MUSICPLAYERACTIONHANDLER_H
 
 #include <ahplugin.h>
+#include <mpxplaybackcommanddefs.h>
 
 // FORWARD DECLARATION
 class CLiwMap;
@@ -126,6 +127,11 @@
     TInt ExtractVariantL( const CLiwMap* aMap, TLiwVariant& aVariant,
             const TDesC8& aMapName );
 
+    /**
+     *  Sets the playback command.
+     *  @param aCommand commandType.
+     */
+    void SetPlaybackCommandL( TMPXPlaybackCommand aCommand );
 private: // data
 
     /**
--- a/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp	Fri Mar 12 15:42:25 2010 +0200
+++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp	Mon Mar 15 12:40:11 2010 +0200
@@ -27,6 +27,7 @@
 #include <mpxmusicplayerviewplugin.hrh> // KMPXPluginTypePlaybackUid
 #include <AknTaskList.h>                // CAknTaskList
 
+#include <mpxcommandgeneraldefs.h>
 #include <mpxcommonuihelper.h>
 #include <mpxcollectionhelperfactory.h>
 #include "musicplayeractionhandler.h"
@@ -38,6 +39,8 @@
 const TInt KPlayerMusicPlayerParameterGranularity = 50;
 const TUid  KMusicPlayerAppUid = { 0x102072C3 };
 
+const TInt KMPXStandAloneProcessIDTop32( 1 );
+const TInt KMPXStandAloneProcessIDBottom32( 2 );
 // RProperty key to identify the case when Music Player launching
 // in the background
 const TInt KMPXLaunchingOnBackground( 100 );
@@ -122,13 +125,9 @@
     errCode = ExtractVariantL( aMap, variant, KCommand );
     if ( errCode == KErrNone )
         {
-        if ( !iPlaybackUtility ) // Ensure that the utility exists
-            {
-            iPlaybackUtility = MMPXPlaybackUtility::NewL( KMusicPlayerAppUid);
-            }	
         TMPXPlaybackCommand Command;
         Command = static_cast<TMPXPlaybackCommand>( variant.AsTInt32() );
-        iPlaybackUtility->CommandL( Command );
+        SetPlaybackCommandL( Command );
         }
     CleanupStack::PopAndDestroy( &variant);
     MPX_DEBUG1("<--CMusicPlayerActionHandler::ExecutePlaybackCommandL()");
@@ -501,5 +500,50 @@
     return errCode;
     }
 
+// ---------------------------------------------------------------------------
+// Set the command to playbackUtility
+// ---------------------------------------------------------------------------
+//
+void CMusicPlayerActionHandler::SetPlaybackCommandL( TMPXPlaybackCommand aCommand )
+    {
+    MPX_DEBUG1("-->CMusicPlayerActionHandler::SetPlaybackCommandL()");
+    //Try to get musicplay StandAloneMode process id
+    TInt procId( 0 );
+    TUint64 mpProcId( 0 );
+    TInt err( RProperty::Get( KMusicPlayerAppUid, KMPXStandAloneProcessIDTop32, procId ) );
+    if ( err == KErrNone )
+        {
+        mpProcId = TUint64( procId ) << 32;
+        err = RProperty::Get( KMusicPlayerAppUid, KMPXStandAloneProcessIDBottom32, procId );
+        if ( err == KErrNone )
+            {
+            mpProcId += procId;
+            }
+        else
+            {
+            mpProcId = 0;
+            }
+        }
+    
+    CMPXCommand* cmd( CMPXCommand::NewL() );
+    CleanupStack::PushL( cmd );
+    cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral );
+    cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
+    cmd->SetTObjectValueL<TInt>( KMPXCommandPlaybackGeneralType, aCommand );
+    cmd->SetTObjectValueL<TInt>( KMPXCommandPlaybackGeneralData, 0 );
+    if ( mpProcId )
+        {
+        //This attribute will be used by playbckEngine->iLastActiveProcess 
+        cmd->SetTObjectValueL<TProcessId> ( KMPXCommandPlaybackGeneralClientPid, mpProcId );
+        }
+    if ( !iPlaybackUtility ) // Ensure that the utility exists
+        {
+        iPlaybackUtility = MMPXPlaybackUtility::NewL( KMusicPlayerAppUid);
+        }	
+
+    iPlaybackUtility->CommandL( *cmd );
+    CleanupStack::PopAndDestroy( cmd );
+    MPX_DEBUG1("<--CMusicPlayerActionHandler::SetPlaybackCommandL()");
+    }
 //  End of File
 
--- a/musicplayer_plat/mpx_music_player_commonui_api/inc/mpxalbumartutil.h	Fri Mar 12 15:42:25 2010 +0200
+++ b/musicplayer_plat/mpx_music_player_commonui_api/inc/mpxalbumartutil.h	Mon Mar 15 12:40:11 2010 +0200
@@ -20,7 +20,7 @@
 #define CMPXALBUMARTUTIL_H
 
 #include <gdi.h>
-#include <metadatafield.hrh>
+#include <MetaDataField.hrh>
 #include <thumbnailmanager.h>
 #include <thumbnailmanagerobserver.h>