Fix ContactManager
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 13 Sep 2017 14:48:03 +0000 (17:48 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 13 Sep 2017 14:48:03 +0000 (17:48 +0300)
TizenRefApp-9282, TizenRefApp-9314

Change-Id: I3363a01d56db40952629f2ad42bb022bdd2616cd
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Common/ContactManager/src/ContactManager.cpp

index 7ae6347..05f3c30 100644 (file)
        ContactPersonNumberRef ContactManager::getContactPersonNumber(int phoneNumId)
        {
                contacts_filter_h filter = nullptr;
-               contacts_filter_create(_contacts_contact_number._uri, &filter);
+               contacts_filter_create(_contacts_person_number._uri, &filter);
                contacts_filter_add_int(filter, _contacts_person_number.number_id, CONTACTS_MATCH_EQUAL, phoneNumId);
                return filter ? getContactPersonNumber(filter) : nullptr;
        }
        ContactPersonEmailRef ContactManager::getContactPersonEmail(int emailId)
        {
                contacts_filter_h filter = nullptr;
-               contacts_filter_create(_contacts_contact_email._uri, &filter);
+               contacts_filter_create(_contacts_person_email._uri, &filter);
                contacts_filter_add_int(filter, _contacts_person_email.email_id, CONTACTS_MATCH_EQUAL, emailId);
                return filter ? getContactPersonEmail(filter) : nullptr;
        }
        ContactPersonNumberRef ContactManager::getContactPersonNumber(const std::string &number)
        {
                contacts_filter_h filter = nullptr;
-               contacts_filter_create(_contacts_contact_number._uri, &filter);
+               contacts_filter_create(_contacts_person_number._uri, &filter);
                contacts_filter_add_str(filter, _contacts_person_number.number_filter, CONTACTS_MATCH_EXACTLY, number.c_str());
                return filter ? getContactPersonNumber(filter) : nullptr;
        }