summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyeonghun Lee <kh9090.lee@samsung.com>2016-07-05 20:16:02 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2016-07-05 20:16:02 +0900
commitd53172148b55fe548d7ea0043a3934314532b7f0 (patch)
tree142d9d91fe3d1d9dbe4884bdec27c2a643360707
parente5c248131b08f82df5adfeaaf9097ccbfc8ce38a (diff)
downloadmsg-service-d53172148b55fe548d7ea0043a3934314532b7f0.tar.gz
msg-service-d53172148b55fe548d7ea0043a3934314532b7f0.tar.bz2
msg-service-d53172148b55fe548d7ea0043a3934314532b7f0.zip
Change-Id: I114c08ddd9244e3de9f975d28682b131ca62d18c Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
-rw-r--r--manager/src/msg-manager-notification.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/manager/src/msg-manager-notification.cpp b/manager/src/msg-manager-notification.cpp
index ac4e516..b4b26c8 100644
--- a/manager/src/msg-manager-notification.cpp
+++ b/manager/src/msg-manager-notification.cpp
@@ -597,7 +597,7 @@ void MsgMgrDeleteNotification(msg_mgr_notification_type_t noti_type, int simInde
MSG_MGR_DEBUG("deleted notification ID = [%d] Type = [%d]", notiId, noti_type);
if (notiId > 0)
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, notiId);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, notiId);
} else {
MSG_MGR_DEBUG("No matching type [%d]", noti_type);
@@ -743,6 +743,11 @@ void setProperty(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info)
MSG_MGR_DEBUG("Fail to notification_set_display_applist");
}
+ /* set pkg name */
+ noti_err = notification_set_pkgname(noti_h, MSG_DEFAULT_APP_ID);
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
+ MSG_MGR_DEBUG("Fail to notification_set_pkgname");
+ }
MSG_MGR_END();
}
@@ -1114,6 +1119,12 @@ void setActiveProperty(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info)
MSG_MGR_DEBUG("Fail to notification_set_display_applist");
}
+ /* set pkg name */
+ noti_err = notification_set_pkgname(noti_h, MSG_DEFAULT_APP_ID);
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
+ MSG_MGR_DEBUG("Fail to notification_set_pkgname");
+ }
+
MSG_MGR_END();
}
@@ -1774,7 +1785,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
if (noti_info->id > 0 && noti_info->count == 1) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -1798,7 +1809,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
/* No unread message. */
if (noti_info->id > 0) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -1894,7 +1905,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
/* No unread message. */
if (noti_info->id > 0) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -1992,7 +2003,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
/* No unread message. */
if (noti_info->id > 0) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -2090,7 +2101,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
if (noti_info->id > 0 && noti_info->count == 1) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -2108,7 +2119,7 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
if (!isForInstantMessage) {
/* No unread message. */
if (noti_info->id > 0) {
- noti_err = notification_delete_by_priv_id(NULL, NOTIFICATION_TYPE_NOTI, noti_info->id);
+ noti_err = notification_delete_by_priv_id(MSG_DEFAULT_APP_ID, NOTIFICATION_TYPE_NOTI, noti_info->id);
if (noti_err != NOTIFICATION_ERROR_NONE) {
MSG_MGR_DEBUG("Fail to notification_delete_by_priv_id : %d", noti_err);
}
@@ -2823,6 +2834,9 @@ int MsgMgrInsertInstantMessage(msg_mgr_notification_type_t noti_type)
if (notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_TICKER) != NOTIFICATION_ERROR_NONE)
MSG_MGR_DEBUG("Fail to notification_set_display_applist");
+ if (notification_set_pkgname(noti, MSG_DEFAULT_APP_ID) != NOTIFICATION_ERROR_NONE)
+ MSG_MGR_DEBUG("Fail to notification_set_pkgname");
+
if (notification_post(noti) != NOTIFICATION_ERROR_NONE)
MSG_MGR_DEBUG("Fail to notification_post");