From 2968685d9a495802dc4d0eadcd457a1d25656f19 Mon Sep 17 00:00:00 2001 From: San Cho Date: Mon, 13 Jun 2016 12:28:42 +0900 Subject: [PATCH] New mails notification is merged with sending email notification in quick panel. [Problem] New mails notification is merged with sending email notification in quick panel. [Cause & Measure] Cause: notification private id was shared with new mail notification and sending mail notification. Measure: remove using private id for sending mail nofitifcation. Change-Id: Icf625efd6692167c3e0f6ac94d7d2d7bac5912d7 (cherry picked from commit 1a31fab290be58ba30247599c2b0d918f874b0be) --- email-core/email-core-utils.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/email-core/email-core-utils.c b/email-core/email-core-utils.c index ad92011..ac10553 100755 --- a/email-core/email-core-utils.c +++ b/email-core/email-core-utils.c @@ -1958,13 +1958,14 @@ INTERNAL_FUNC int emcore_add_notification_for_send(char *multi_user_name, int ac goto FINISH_OFF; } - if ((noti_err = notification_insert(noti, &private_id)) != NOTIFICATION_ERROR_NONE) { + if ((noti_err = notification_insert(noti, NULL)) != NOTIFICATION_ERROR_NONE) { EM_DEBUG_EXCEPTION("notification_insert failed [%d]", noti_err); err = EMAIL_ERROR_NOTI; goto FINISH_OFF; } g_sending_noti_handle = noti; +#if 0 EM_DEBUG_LOG("Private_id = [%d]", private_id); SNPRINTF(vconf_private_id, sizeof(vconf_private_id), "%s/%d", VCONF_KEY_NOTI_PRIVATE_ID, account_id); @@ -1973,6 +1974,7 @@ INTERNAL_FUNC int emcore_add_notification_for_send(char *multi_user_name, int ac err = EMAIL_ERROR_GCONF_FAILURE; goto FINISH_OFF; } +#endif break; @@ -2025,17 +2027,9 @@ INTERNAL_FUNC void emcore_update_notification_for_send(int account_id, int mail_ { EM_DEBUG_FUNC_BEGIN("account_id: %d, mail_id: %d, progress: %f", account_id, mail_id, progress); - int private_id = 0; - char vconf_private_id[MAX_PATH] = {0, }; notification_error_e noti_err = NOTIFICATION_ERROR_NONE; - SNPRINTF(vconf_private_id, sizeof(vconf_private_id), "%s/%d", VCONF_KEY_NOTI_PRIVATE_ID, account_id); - if (vconf_get_int(vconf_private_id, &private_id) != 0) { - EM_DEBUG_EXCEPTION("vconf_get_int failed"); - } - - EM_DEBUG_LOG("Private_id = [%d]", private_id); - noti_err = notification_update_progress(g_sending_noti_handle, private_id, progress); + noti_err = notification_update_progress(g_sending_noti_handle, NOTIFICATION_PRIV_ID_NONE, progress); if (noti_err != NOTIFICATION_ERROR_NONE) { EM_DEBUG_LOG("notification_update_progress failed [0x%x]", noti_err); } @@ -3352,12 +3346,12 @@ INTERNAL_FUNC int emcore_clear_notifications(char *multi_user_name, int account_ } for(i = 0; i < account_count; i++) { - error_code = emcore_delete_notification_by_account(multi_user_name, account_list[i].account_id, true, false); + error_code = emcore_delete_notification_by_account(multi_user_name, account_list[i].account_id, false, false); if (error_code != EMAIL_ERROR_NONE) EM_DEBUG_EXCEPTION("emcore_delete_notification_by_account failed"); } } else { - error_code = emcore_delete_notification_by_account(multi_user_name, account_id, true, false); + error_code = emcore_delete_notification_by_account(multi_user_name, account_id, false, false); if (error_code != EMAIL_ERROR_NONE) EM_DEBUG_EXCEPTION("emcore_delete_notification_by_account failed"); } -- 2.7.4