diff -r e42293e811d8 -r 6c1dfe4da5dd mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp --- a/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Thu Aug 19 10:24:28 2010 +0300 +++ b/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Tue Aug 31 15:41:40 2010 +0300 @@ -36,6 +36,7 @@ #include #include #include +#include #include "mpxcollectionpluginhandler.h" #include "mpxcollectioncache.h" @@ -211,12 +212,21 @@ break; } case EMcMsgDiskInserted: + { + // inverting the notification order, this to get the message to + // the UI faster. for( TInt i=0; iNotifyL( aMsg, aData ); } notify = EFalse; + command = EMcReOpenCollection; + data = aData; + // Clear the cache + clearCache = ETrue; + break; + } case EMcMsgFormatEnd: case EMcMsgUSBMassStorageEnd: { @@ -224,7 +234,7 @@ data = aData; // Clear the cache - clearCache = ETrue; + clearCache = ETrue; break; } case EMcMsgUSBMTPStart: @@ -316,6 +326,7 @@ EXPORT_C void CMPXCollectionEngine::GetSupportedTypesL( RPointerArray& aArray ) { + CleanupResetAndDestroyPushL(aArray); RArray uids; CleanupClosePushL(uids); iPluginHandler->GetPluginUids(uids); @@ -340,6 +351,7 @@ CleanupStack::Pop(type); } CleanupStack::PopAndDestroy(&uids); + CleanupStack::Pop(&aArray); } // ----------------------------------------------------------------------------