--- a/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -383,35 +383,40 @@
@return ETrue if the uid match or reverse.
*/
TBool CViewContactManager::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
- {
- TBool correctType(EFalse);
- if (aContactTypeUid==KUidContactCard || aContactTypeUid==KUidContactOwnCard)
- {
- // Ignore Unsorted Contacts flags & White Space flag
- // catch non- contact views
- // Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
- if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
- & (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactGroup)
- {
- if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactICCEntry)
- {
- if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
- {
- correctType = ETrue;
- }
- }
- return correctType;
- }
+ {
+ TBool correctType = EFalse;
+
+ if (aContactTypeUid == KUidContactCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactOwnCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactGroup)
+ {
+ if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactICCEntry)
+ {
+ if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+ {
+ correctType = ETrue;
+ }
+ }
+
+ return correctType;
+ }
/**