diff -r 2666d9724c76 -r d4f567ce2e7c phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStore.cpp --- a/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStore.cpp Thu Jul 15 18:22:55 2010 +0300 +++ b/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStore.cpp Thu Aug 19 09:41:07 2010 +0300 @@ -48,6 +48,7 @@ #include #include +#include namespace VPbkSimStore { // LOCAL @@ -580,17 +581,38 @@ void CContactStore::StoreReady( MVPbkSimCntStore& /*aStore*/ ) { TVPbkGsmStoreProperty gsmProperties; - TInt res = iNativeStore->GetGsmStoreProperties( gsmProperties ); - - if ( res == KErrNone ) + TInt res = KErrNone; + if( !FeatureManager::FeatureSupported( KFeatureIdFfTdClmcontactreplicationfromphonebooktousimcard ) ) + { + res= iNativeStore->GetGsmStoreProperties( gsmProperties ); + if ( res == KErrNone ) + { + delete iSupportedFieldTypes; + iSupportedFieldTypes = NULL; + TRAP( res, iSupportedFieldTypes = CSupportedFieldTypes::NewL( + iStoreDomain.FieldTypeMappings(), gsmProperties ) ); + iSimStoreCapabilities = gsmProperties.iCaps; + } + } + else // if contact replication from phonebook to usim card. { - delete iSupportedFieldTypes; - iSupportedFieldTypes = NULL; - TRAP( res, iSupportedFieldTypes = CSupportedFieldTypes::NewL( - iStoreDomain.FieldTypeMappings(), gsmProperties ) ); - iSimStoreCapabilities = gsmProperties.iCaps; + TInt resGsm = iNativeStore->GetGsmStoreProperties( gsmProperties ); + TVPbkUSimStoreProperty usimProperties; + TInt resUsim = iNativeStore->GetUSimStoreProperties( usimProperties ); + if( resGsm == KErrNone && resUsim == KErrNone ) + { + delete iSupportedFieldTypes; + iSupportedFieldTypes = NULL; + TRAP( res, iSupportedFieldTypes = CSupportedFieldTypes::NewL( + iStoreDomain.FieldTypeMappings(), gsmProperties, usimProperties ) ); + iSimStoreCapabilities = gsmProperties.iCaps; + } + else + { + res = ( resGsm != KErrNone ? resGsm : resUsim ); + } } - + if ( res != KErrNone ) { iStoreState = EStoreNotAvailable;