diff options
author | Myungki Lee <mk5004.lee@samsung.com> | 2017-11-27 19:13:42 +0900 |
---|---|---|
committer | MyungKi Lee <mk5004.lee@samsung.com> | 2017-11-29 10:41:32 +0000 |
commit | c4f8dbf0b8ed50845dcf1c8d9c050630923fb2f9 (patch) | |
tree | b76de10852f7244880935c22c0395e8ba1507a8b | |
parent | 9a722a0f3b506127dbe05660d9ed284be36439bb (diff) | |
download | notification-c4f8dbf0b8ed50845dcf1c8d9c050630923fb2f9.tar.gz notification-c4f8dbf0b8ed50845dcf1c8d9c050630923fb2f9.tar.bz2 notification-c4f8dbf0b8ed50845dcf1c8d9c050630923fb2f9.zip |
Add the value to be passed to the viewer
- This value allows viewer to distinguish whether noti is added or deleted.
Change-Id: Ie1ce76e933effb6ea1dae548d6902432993367d2
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
(cherry picked from commit 5b887934600dc9f9c26661a8d49eed0226e2d678)
-rw-r--r-- | include/notification_viewer.h | 3 | ||||
-rw-r--r-- | src/notification_viewer.c | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/notification_viewer.h b/include/notification_viewer.h index f75bdf4..f4b9609 100644 --- a/include/notification_viewer.h +++ b/include/notification_viewer.h @@ -18,6 +18,7 @@ #define __NOTIFICATION_VIEWER_H__ int notification_get_default_viewer(const char *path, char **default_viewer); -int notification_launch_default_viewer(const char *default_viewer, int priv_id, uid_t uid); +int notification_launch_default_viewer(const char *default_viewer, int priv_id, + notification_op_type_e status, uid_t uid); #endif /* __NOTIFICATION_VIEWER_H__ */ diff --git a/src/notification_viewer.c b/src/notification_viewer.c index 9247375..f3e8b1a 100644 --- a/src/notification_viewer.c +++ b/src/notification_viewer.c @@ -54,7 +54,8 @@ EXPORT_API int notification_get_default_viewer(const char *path, char **default_ } /* LCOV_EXCL_START */ -EXPORT_API int notification_launch_default_viewer(const char *default_viewer, int priv_id, uid_t uid) +EXPORT_API int notification_launch_default_viewer(const char *default_viewer, + int priv_id, notification_op_type_e status, uid_t uid) { int ret; char buf[32] = {0,}; @@ -80,6 +81,15 @@ EXPORT_API int notification_launch_default_viewer(const char *default_viewer, in goto out; } + memset(buf, 0, sizeof(buf)); + snprintf(buf, sizeof(buf), "%d", status); + + ret = aul_svc_add_data(b, "NOTIFICATION_OP_TYPE", buf); + if (ret != AUL_SVC_RET_OK) { + NOTIFICATION_ERR("Failed to add extra_data[%x]", ret); + goto out; + } + ret = aul_svc_run_service_async_for_uid(b, 0, NULL, NULL, uid); if (ret < 0) { NOTIFICATION_ERR("Failed to request app launch[%d]", ret); |