diff -r f7f0874bfe7d -r 6b87b143d312 photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp --- a/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Tue Feb 02 10:12:14 2010 +0200 +++ b/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Fri Feb 19 22:51:01 2010 +0200 @@ -134,13 +134,7 @@ expired = iDrmUtility->CheckOpenRightsL(uri, (cat == EMPXImage)); if( expired ) { - // 200 is to Consume rights only while opening DRM items - // in Cover Flow Widget - if ( aSize.iWidth > 200 && aIsFocused) - { - ConsumeDRMRightsL( aMedia ); - } - if ( isValid ) + if ( isValid ) { // Fix for EABI-7RL9DD // Replaced defaultSize with aSize @@ -166,9 +160,9 @@ TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL( icon.bitmapId, resFile, defaultSize ).Id() ); } - else if ( KErrNone == thumbnailError || KErrArgument == thumbnailError || ( drm && isValid == EGlxDrmRightsInvalid ) ) - - { + else if ( (KErrNone == thumbnailError) || (KErrArgument == thumbnailError) + || (KErrDiskFull == thumbnailError) || ( drm && isValid == EGlxDrmRightsInvalid ) ) + { //Try and see if we can scale and show the grid tnm else show the default TBool isGridTnmShown = EFalse; if(HasRelevantThumbnail(aMedia,defaultSize)) @@ -210,52 +204,6 @@ throw std::bad_alloc(); } } - -void GlxThumbnailVariantType::ConsumeDRMRightsL( const TGlxMedia& aMedia ) - { - TRACER("GlxThumbnailVariantType::ConsumeDRMRightsL"); - - const CGlxMedia* media = aMedia.Properties(); - - if(media) - { - if(aMedia.IsDrmProtected()) - { - - TMPXGeneralCategory cat = aMedia.Category(); - const TDesC& uri = aMedia.Uri(); - if( cat != EMPXNoCategory && uri.Length() > 0 ) - { - - // check if rights have expired - TBool expired = !iDrmUtility->CheckOpenRightsL(uri, (cat == EMPXImage)); - - if(expired) - { - return; - } - - TSize size; - if(EMPXImage == cat && aMedia.GetDimensions(size)) - { - // check size - TSize bmpSize = ThumbnailSize(media); - - if(ConsumeRightsBasedOnSize(size, bmpSize)) - { - // pass URI to DRM utility - iDrmUtility->ConsumeRightsL(uri); - } - } - } - } - else - { - // not an DRM'd item no need to check again - } - } - - } // ----------------------------------------------------------------------------- // ConsumeRightsBasedOnSize - check if DRM rights should be consumed @@ -326,7 +274,7 @@ // TSize GlxThumbnailVariantType::ThumbnailSize(const CGlxMedia* aMedia) { - TRACER("CGlxCommandHandlerDrm::ThumbnailSize"); + TRACER("GlxThumbnailVariantType::ThumbnailSize"); TSize bmpSize(0,0); TArray attr = aMedia->Attributes();