diff options
author | Gwangbok Kim <gwangbok.kim@samsung.com> | 2013-08-05 20:57:08 +0900 |
---|---|---|
committer | Gwangbok Kim <gwangbok.kim@samsung.com> | 2013-08-05 20:57:08 +0900 |
commit | 0865e741a1d80bd942d69af4fa6697d51c51b166 (patch) | |
tree | cf8bd4ee5e14bdb6fa61869b9165da94b31082b8 | |
parent | b9fc86156bbe637098646f6610819d2518bccbe3 (diff) | |
download | social-0865e741a1d80bd942d69af4fa6697d51c51b166.tar.gz social-0865e741a1d80bd942d69af4fa6697d51c51b166.tar.bz2 social-0865e741a1d80bd942d69af4fa6697d51c51b166.zip |
fix TC failure
Change-Id: Iec38d5ec11b76c2f3cb4e4aac486d239db63244d
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
-rw-r--r-- | src/FScl_AddressbookImpl.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/FScl_AddressbookImpl.cpp b/src/FScl_AddressbookImpl.cpp index b13e613..c747495 100644 --- a/src/FScl_AddressbookImpl.cpp +++ b/src/FScl_AddressbookImpl.cpp @@ -939,13 +939,17 @@ _AddressbookImpl::SearchContactsByPhoneNumberN(const String& phoneNumber) const std::unique_ptr<char[]> pCharArray(_StringConverter::CopyToCharArrayN(phoneNumber)); SysTryReturn(NID_SCL, pCharArray != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __Filter<__ContactsContactNumber> subFilter; + subFilter.Construct(); + subFilter.AddString(_contacts_contact_number.normalized_number, CONTACTS_MATCH_CONTAINS, pCharArray.get()); + subFilter.AddOperator(CONTACTS_FILTER_OPERATOR_OR); + subFilter.AddString(_contacts_contact_number.number, CONTACTS_MATCH_CONTAINS, pCharArray.get()); + __Filter<__ContactsContactNumber> filter; filter.Construct(); filter.AddInt(_contacts_contact_number.address_book_id, CONTACTS_MATCH_EQUAL, __addressbookId); filter.AddOperator(CONTACTS_FILTER_OPERATOR_AND); - filter.AddString(_contacts_contact_number.normalized_number, CONTACTS_MATCH_CONTAINS, pCharArray.get()); - filter.AddOperator(CONTACTS_FILTER_OPERATOR_OR); - filter.AddString(_contacts_contact_number.number, CONTACTS_MATCH_CONTAINS, pCharArray.get()); + filter.AddFilter(subFilter); unsigned int projectionIds[1]; projectionIds[0] = _contacts_contact_number.contact_id; @@ -1877,12 +1881,12 @@ _AddressbookImpl::CopyContactRecordHandle(contacts_record_h srcHandle) SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); // favorite - contacts_record_get_bool(sourceRecordHandle, _contacts_contact.is_favorite, &boolValue); - contacts_record_set_bool(destRecordHandle, _contacts_contact.is_favorite, boolValue); + contacts_record_get_bool(srcHandle, _contacts_contact.is_favorite, &boolValue); + contacts_record_set_bool(contactHandle, _contacts_contact.is_favorite, boolValue); // uid - contacts_record_get_str_p(sourceRecordHandle, _contacts_contact.uid, &pCharValue); - contacts_record_set_str(destRecordHandle, _contacts_contact.uid, pCharValue); + contacts_record_get_str_p(srcHandle, _contacts_contact.uid, &pCharValue); + contacts_record_set_str(contactHandle, _contacts_contact.uid, pCharValue); ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // name |