--- a/phonebookui/Phonebook2/ServerApplication/src/CPbk2CommAddressSelectPhase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ServerApplication/src/CPbk2CommAddressSelectPhase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -130,7 +130,8 @@
iPriorities( aPriorities ),
iRskBack( aRskBack ),
iFieldTypeSelector ( aFieldTypeSelector ),
- iCommMethod( aCommSelector )
+ iCommMethod( aCommSelector ),
+ iContactRetrieved( EFalse )
{
}
@@ -243,6 +244,7 @@
{
// Start by retrieving first contact
iState = EMainContactRetrieving;
+ iContactRetrieved = ETrue;
RetrieveContactL();
}
@@ -581,13 +583,18 @@
// Error occured, destroy presence icon array
iPresenceIconsRetrieved = ETrue;
iPresenceIconArray.ResetAndDestroy();
-
- // start address fetch dialog, if it waits for presence icons
- TRAPD( err, DoSelectAddressesL() );
- if ( err != KErrNone )
+ //Needn't to launch address fetch dialog if contact had been retrieved,
+ //because it will start this dialog after retrieve the contact,
+ //avoid multiple launching of the select dialog
+ if ( !iContactRetrieved )
{
- iObserver.PhaseError( *this, err );
- }
+ // Launch the address fetch dialog if it's waiting for presence icons.
+ TRAPD( err, DoSelectAddressesL() );
+ if ( err != KErrNone )
+ {
+ iObserver.PhaseError( *this, err );
+ }
+ }
}
}