diff -r 0d28c1c5b6dd -r 2828b4d142c0 phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp --- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Tue Apr 27 16:23:35 2010 +0300 +++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Tue May 11 16:00:21 2010 +0300 @@ -876,7 +876,8 @@ iContainer( aContainer ), iNameFormatter( aNameFormatter ), iStoreProperties( aStoreProperties ), - iAllowPointerEvents( ETrue ) + iAllowPointerEvents( ETrue ), + iOpeningCca( EFalse ) { } @@ -897,7 +898,8 @@ iNameFormatter( aNameFormatter ), iStoreProperties( aStoreProperties ), iAllowPointerEvents( ETrue ), - iThumbManager( aThumbManager ) + iThumbManager( aThumbManager ), + iOpeningCca( EFalse ) { } @@ -2401,14 +2403,33 @@ // reset too. So, we reset both the find box and the view stack. TRAPD( res, { - // This will reset back to base view - iCurrentState->ResetFindL(); + // This will reset back to base view, however retain original view + //when opening CCA + if( !iOpeningCca ) + { + iCurrentState->ResetFindL(); + } }); HandleError( res ); if( !iCheckMassUpdate->MassUpdateCheckThis() ) { - Reset(); + // If it is the first time to goto a contat's cca card, then in cca we + // will set a defualt number to that contact by CmsSetVoiceCallDefault. + // Then db item changed event is notified to ui layer and names list control + // updated accordingly. But to end user that is not allowed, so use this + // flag to avoid this reset of ui control. + if( iOpeningCca ) + { + if( iCurrentState->NamesListState() == EStateEmpty ) + { + SelectAndChangeReadyStateL(); + } + } + else + { + Reset(); + } } // Do not handle contact addition here (DoHandleContactAdditionL), @@ -2603,6 +2624,15 @@ } // --------------------------------------------------------------------------- +// CPbk2NamesListControl::SetOpeningCca +// --------------------------------------------------------------------------- +// +EXPORT_C void CPbk2NamesListControl::SetOpeningCca( TBool aIsOpening ) + { + iOpeningCca = aIsOpening; + } + +// --------------------------------------------------------------------------- // CPbk2NamesListControlBgTask::CPbk2NamesListControlBgTask // --------------------------------------------------------------------------- //