--- a/phonebookengines/contactsmodel/cntview/LocalView.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntview/LocalView.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -1681,36 +1681,40 @@
}
TBool CContactLocalView::ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude)
- {
- TBool correctType(EFalse);
- if (aType==KUidContactCard || aType==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;
- }
- }
+ {
+ TBool correctType = EFalse;
+
+ if (aType == KUidContactCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aType == KUidContactOwnCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
else if (aType==KUidContactGroup)
{
- if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
- {
- correctType = ETrue;
- }
- }
+ if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+ {
+ correctType = ETrue;
+ }
+ }
else if (aType == KUidContactICCEntry)
- {
- if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
- {
- correctType = ETrue;
- }
- }
- return correctType;
- }
+ {
+ if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+ {
+ correctType = ETrue;
+ }
+ }
+ return correctType;
+ }
void CIdleContactSorter::ContactPhbkSyncEventHandler(TPhonebookState aPhbkState)
{