From: Keebum Kim Date: Tue, 14 May 2013 12:29:58 +0000 (+0900) Subject: Fix Nabi issues. (Email contact sync & Noti icon) X-Git-Tag: submit/tizen_2.1/20130515.031035^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_2.1;p=framework%2Fmessaging%2Fmsg-service.git Fix Nabi issues. (Email contact sync & Noti icon) Change-Id: Ib06d9b31c1a72ae6f875fd8d7ab30694ce97fc6e --- diff --git a/include/utils/MsgNotificationWrapper.h b/include/utils/MsgNotificationWrapper.h index 75e7c6f..a5c7706 100755 --- a/include/utils/MsgNotificationWrapper.h +++ b/include/utils/MsgNotificationWrapper.h @@ -29,22 +29,25 @@ ==================================================================================================*/ #define MSG_APP_PACKAGE_NAME "message" #define MSG_SYS_PACKAGE_NAME "sys_string" -#define NORMAL_MSG_ICON_PATH "/usr/apps/org.tizen.message/res/icons/default/small/org.tizen.message.noti.png" -#define VOICE_MSG_ICON_PATH "/usr/apps/org.tizen.message/res/icons/default/small/org.tizen.message.voice.png" -#define CB_MSG_ICON_PATH "/usr/apps/org.tizen.message/res/icons/default/small/org.tizen.message.noti.png" -#define NOTI_MSG_ICON_PATH "/usr/apps/org.tizen.message/res/icons/default/small/org.tizen.message.noti.png" +#define NORMAL_MSG_ICON_PATH "/opt/usr/apps/8r4r5ddzzn/shared/res/screen-density-xhigh/mainmenu.png" +#define VOICE_MSG_ICON_PATH "/opt/usr/apps/8r4r5ddzzn/shared/res/screen-density-xhigh/mainmenu.png" +#define CB_MSG_ICON_PATH "/opt/usr/apps/8r4r5ddzzn/shared/res/screen-density-xhigh/mainmenu.png" +#define NOTI_MSG_ICON_PATH "/opt/usr/apps/8r4r5ddzzn/shared/res/screen-density-xhigh/mainmenu.png" #define MSG_APP_LOCALEDIR "/usr/apps/org.tizen.message/res/locale" + #define SENDING_MULTIMEDIA_MESSAGE_FAILED "Sending multimedia message failed" #define MULTIMEDIA_MESSAGE_SENT "Multimedia message sent" #define RETRIEVING_MESSAGE_FAILED "Retrieving message failed" #define MESSAGE_RETRIEVED "Message retrieved" -#define SMS_MESSAGE_SENT "Message sent" -#define SMS_MESSAGE_SENDING_FAIL "Sending message failed" +#define SMS_MESSAGE_SENT "Message sent" +#define SMS_MESSAGE_SENDING_FAIL "Sending message failed" + #define MESSAGE "Message" #define NEW_MESSAGE "New message" #define NEW_MESSAGES "New messages" -#define MSG_SYS_LOCALEDIR "/usr/share/locale" + +#define MSG_SYS_LOCALEDIR "/usr/share/locale" #define NOTIFICATION_PRIV_ID DEFAULT_SETTING_PATH"/notification_priv_id" diff --git a/utils/MsgContact.cpp b/utils/MsgContact.cpp index 3fc9512..5b75e67 100755 --- a/utils/MsgContact.cpp +++ b/utils/MsgContact.cpp @@ -492,10 +492,12 @@ bool MsgUpdateContact(int index, int type) return false; } + MSG_DEBUG("_contacts_contact.number count [%d]", count); + if (count > 0) { for(unsigned int i=0; i < count; i++) { - MSG_DEBUG("Add Contact Data"); + MSG_DEBUG("Add Number Contact Data"); contacts_record_h number = NULL; @@ -521,9 +523,47 @@ bool MsgUpdateContact(int index, int type) } } } - } else {// No phone number in contact + } + + count = 0; + ret = contacts_record_get_child_record_count(contact, _contacts_contact.email, &count); + if (ret != CONTACTS_ERROR_NONE) { + MSG_DEBUG("contacts_record_get_child_record_count() Error [%d]", ret); contacts_record_destroy(contact, true); - return true; + return false; + } + + MSG_DEBUG("_contacts_contact.email count [%d]", count); + + if (count > 0) { + for(unsigned int i=0; i < count; i++) + { + MSG_DEBUG("Add Email Contact Data"); + + contacts_record_h email = NULL; + + ret = contacts_record_get_child_record_at_p(contact, _contacts_contact.email, i, &email); + if (ret != CONTACTS_ERROR_NONE) { + MSG_DEBUG("contacts_record_get_child_record_at_p() Error [%d]", ret); + contacts_record_destroy(contact, true); + return false; + } + + char* strNumber = NULL; + ret = contacts_record_get_str_p(email, _contacts_email.email, &strNumber); + if (ret != CONTACTS_ERROR_NONE) { + MSG_DEBUG("contacts_record_get_str_p() Error [%d]", ret); + contacts_record_destroy(contact, true); + return false; + } + + if (strNumber != NULL) { + MSG_DEBUG("email = %s", strNumber); + if (!MsgInsertContact(&contactInfo, strNumber)) { + MSG_DEBUG("MsgInsertContact fail."); + } + } + } } MsgStoSetConversationDisplayName(&ContactDbHandle, index);