diff options
author | Myungki Lee <mk5004.lee@samsung.com> | 2016-11-08 19:30:23 +0900 |
---|---|---|
committer | Myungki Lee <mk5004.lee@samsung.com> | 2016-11-08 19:30:23 +0900 |
commit | 0bcbe5db3b3267eee52ff32cf7540aeff1dd345f (patch) | |
tree | cc309b05d5b1c0bd7b878afb70a799c751547127 | |
parent | ce3f3f392be0438c8acbcb56d26b68494ff9a1b3 (diff) | |
download | notification-0bcbe5db3b3267eee52ff32cf7540aeff1dd345f.tar.gz notification-0bcbe5db3b3267eee52ff32cf7540aeff1dd345f.tar.bz2 notification-0bcbe5db3b3267eee52ff32cf7540aeff1dd345f.zip |
Can set NULL to path of imagesubmit/tizen_3.0_common/20161110.084657submit/tizen_3.0/20161108.101813accepted/tizen/3.0/wearable/20161110.020313accepted/tizen/3.0/tv/20161110.020253accepted/tizen/3.0/mobile/20161110.020235accepted/tizen/3.0/ivi/20161110.020331accepted/tizen/3.0/common/20161114.081541
- When the image type has a path
Change-Id: I3e99b854580ea67cacf5a7dce97c8fe2c8b0a40b
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
-rwxr-xr-x | src/notification.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/notification.c b/src/notification.c index 0837948..9a1aaca 100755 --- a/src/notification.c +++ b/src/notification.c @@ -95,14 +95,14 @@ char *notification_get_pkgname_by_pid(void) } EXPORT_API int notification_set_image(notification_h noti, - notification_image_type_e type, - const char *image_path) + notification_image_type_e type, + const char *image_path) { bundle *b = NULL; char buf_key[32] = { 0, }; char *ret_val = NULL; - if (noti == NULL || image_path == NULL) + if (noti == NULL) return NOTIFICATION_ERROR_INVALID_PARAMETER; if (type <= NOTIFICATION_IMAGE_TYPE_NONE @@ -118,8 +118,12 @@ EXPORT_API int notification_set_image(notification_h noti, if (ret_val != NULL) bundle_del(b, buf_key); - bundle_add_str(b, buf_key, image_path); + if (image_path != NULL) + bundle_add_str(b, buf_key, image_path); } else { + if (image_path == NULL) + return NOTIFICATION_ERROR_NONE; + b = bundle_create(); snprintf(buf_key, sizeof(buf_key), "%d", type); |