292 { |
292 { |
293 HBufC* fileName = files[ fileIndex ]; |
293 HBufC* fileName = files[ fileIndex ]; |
294 iIsDRMProtected = TAppMngr2DRMUtils::IsDRMProtected( *fileName ); |
294 iIsDRMProtected = TAppMngr2DRMUtils::IsDRMProtected( *fileName ); |
295 if( iIsDRMProtected ) |
295 if( iIsDRMProtected ) |
296 { |
296 { |
297 FLOG( "CAppMngr2SisxAppInfo::ConstructL, protected file %S", fileName ); |
297 FLOG( "CAppMngr2SisxAppInfo::ConstructL, iProtectedFile %S", fileName ); |
298 iProtectedFile = fileName; // takes ownership |
298 iProtectedFile = fileName; // takes ownership |
299 files.Remove( fileIndex ); |
299 files.Remove( fileIndex ); |
300 iIsRightsObjectMissingOrExpired = |
300 iIsRightsObjectMissingOrExpired = |
301 TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL( *fileName ); |
301 TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL( *fileName ); |
|
302 FLOG( "CAppMngr2SisxAppInfo::ConstructL, iIsRightsObjectMissingOrExpired %d", |
|
303 iIsRightsObjectMissingOrExpired ); |
302 } |
304 } |
303 } |
305 } |
304 CleanupStack::PopAndDestroy( &files ); |
306 CleanupStack::PopAndDestroy( &files ); |
305 } |
307 } |
306 |
308 |
324 |
326 |
325 SwiUI::CommonUI::CCUIDetailsDialog* details = SwiUI::CommonUI::CCUIDetailsDialog::NewL(); |
327 SwiUI::CommonUI::CCUIDetailsDialog* details = SwiUI::CommonUI::CCUIDetailsDialog::NewL(); |
326 FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, isDRM %d, noRightsObj %d, CertCount %d", |
328 FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, isDRM %d, noRightsObj %d, CertCount %d", |
327 iIsDRMProtected, iIsRightsObjectMissingOrExpired, iCertificates.Count() ); |
329 iIsDRMProtected, iIsRightsObjectMissingOrExpired, iCertificates.Count() ); |
328 |
330 |
|
331 RFile fileHandle; |
|
332 TInt fileOpenError = KErrNone; |
329 if( iIsDRMProtected && !iIsRightsObjectMissingOrExpired ) |
333 if( iIsDRMProtected && !iIsRightsObjectMissingOrExpired ) |
330 { |
334 { |
331 RFile fileHandle; |
335 FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, iProtecteFile %S", iProtectedFile ); |
332 TInt err = fileHandle.Open( iFs, *iProtectedFile, EFileShareReadersOnly | EFileRead ); |
336 fileOpenError = fileHandle.Open( iFs, *iProtectedFile, EFileShareReadersOnly | EFileRead ); |
333 CleanupClosePushL( fileHandle ); |
337 FLOG( "CAppMngr2SisxAppInfo::ShowDetailsL, fileOpenError %d", fileOpenError ); |
334 |
338 if( !fileOpenError ) |
|
339 { |
|
340 CleanupClosePushL( fileHandle ); |
|
341 } |
|
342 } |
|
343 |
|
344 if( iIsDRMProtected && !iIsRightsObjectMissingOrExpired && !fileOpenError ) |
|
345 { |
335 if( iCertificates.Count() ) |
346 if( iCertificates.Count() ) |
336 { |
347 { |
337 details->ExecuteLD( *iterator, iCertificates, fileHandle ); |
348 details->ExecuteLD( *iterator, iCertificates, fileHandle ); |
338 } |
349 } |
339 else |
350 else |
340 { |
351 { |
341 details->ExecuteLD( *iterator, fileHandle ); |
352 details->ExecuteLD( *iterator, fileHandle ); |
342 } |
353 } |
343 |
354 } |
|
355 else |
|
356 { |
|
357 if( iCertificates.Count() ) |
|
358 { |
|
359 details->ExecuteLD( *iterator, iCertificates ); |
|
360 } |
|
361 else |
|
362 { |
|
363 details->ExecuteLD( *iterator ); |
|
364 } |
|
365 } |
|
366 |
|
367 if( !fileOpenError ) |
|
368 { |
344 CleanupStack::PopAndDestroy( &fileHandle ); |
369 CleanupStack::PopAndDestroy( &fileHandle ); |
345 } |
|
346 else |
|
347 { |
|
348 if( iCertificates.Count() ) |
|
349 { |
|
350 details->ExecuteLD( *iterator, iCertificates ); |
|
351 } |
|
352 else |
|
353 { |
|
354 details->ExecuteLD( *iterator ); |
|
355 } |
|
356 } |
370 } |
357 |
371 |
358 CleanupStack::PopAndDestroy( iterator ); |
372 CleanupStack::PopAndDestroy( iterator ); |
359 } |
373 } |
360 |
374 |