--- a/phonebookui/Phonebook2/NamesListExtension/src/cpbk2mycard.cpp Tue Feb 02 10:12:17 2010 +0200
+++ b/phonebookui/Phonebook2/NamesListExtension/src/cpbk2mycard.cpp Fri Feb 19 22:40:27 2010 +0200
@@ -174,7 +174,7 @@
// CPbk2MyCard::MyCardBitmap
// --------------------------------------------------------------------------
//
-CFbsBitmap* CPbk2MyCard::MyCardBitmap() const
+CFbsBitmap* CPbk2MyCard::MyCardBitmapL() const
{
// if fetched
if( iThumbBitmap )
@@ -184,7 +184,7 @@
CleanupStack::PushL( dstbitmap );
//Get the handle to source bitmap
- TInt srchandle = iThumbBitmap->Handle();
+ const TInt srchandle = iThumbBitmap->Handle();
//Duplicate the bitmap handle. Increases the RefCount of bitmap
//managed but Fbs Server
@@ -235,7 +235,8 @@
NotifyObservers( MPbk2MyCardObserver::EStateStatusResolved );
// fetch store contact
- iRetrieveOperation = iContactManager->RetrieveContactL( *iMyCardLink, *this );
+ TRAP_IGNORE( iRetrieveOperation =
+ iContactManager->RetrieveContactL( *iMyCardLink, *this ) );
}
// --------------------------------------------------------------------------
@@ -271,7 +272,14 @@
iMyCardStoreContact = aContact;
// load thumbnail
- LoadThumbnailL( *iMyCardStoreContact );
+ TRAPD( error, LoadThumbnailL( *iMyCardStoreContact ) );
+ if( error )
+ {
+ delete iThumbBitmap;
+ iThumbBitmap = NULL;
+ // inform observers
+ NotifyObservers( MPbk2MyCardObserver::EStateThumbnailNotFound );
+ }
}
// ---------------------------------------------------------------------------
@@ -341,12 +349,12 @@
// Define parameters for thumbnail
TPbk2ImageManagerParams params;
- TInt useCropping = 0x0008;
// set params
params.iSize = size;
- params.iFlags = TPbk2ImageManagerParams::EScaleImage |
- TPbk2ImageManagerParams::EKeepAspectRatio |
- useCropping; //CROP IMAGE
+ params.iFlags = TPbk2ImageManagerParams::EScaleImage |
+ TPbk2ImageManagerParams::EUseSpeedOptimizedScaling |
+ TPbk2ImageManagerParams::ECropImage ;
+ params.iDisplayMode = EColor16MU;
// contact has image. load it.
iImageOperation = iImageManager->GetImageAsyncL(
¶ms, aContact, *thumbType, *this );
@@ -377,11 +385,7 @@
KMVPbkContactStoreExtension2Uid));
if ( phoneStoreExtension )
{
- TRAPD( err, iOperation = phoneStoreExtension->OwnContactLinkL(*this) );
- if( err )
- {
- // TODO: How is this handled?
- }
+ TRAP_IGNORE( iOperation = phoneStoreExtension->OwnContactLinkL(*this) );
}
}