diff options
author | Myungki Lee <mk5004.lee@samsung.com> | 2016-07-05 23:12:09 +0900 |
---|---|---|
committer | MyungKi Lee <mk5004.lee@samsung.com> | 2016-07-05 20:36:58 -0700 |
commit | d5784495d2a6d8d2c90e9c24b259053341fa9dae (patch) | |
tree | c3ba7287be8c4aa2e7d4f8c2ad9fd3da3e34298b /src | |
parent | 91c914571cb1b3ec81893b49ca270fd13e9e2f0e (diff) | |
download | notification-d5784495d2a6d8d2c90e9c24b259053341fa9dae.tar.gz notification-d5784495d2a6d8d2c90e9c24b259053341fa9dae.tar.bz2 notification-d5784495d2a6d8d2c90e9c24b259053341fa9dae.zip |
Changes the condition for alarmmgr_set_repeat_mode
- If week_flag is 0, alarmmgr_set_repeat_mode return invlid param err.
Change-Id: I37c44809d30609d64eedd8977a2974d5dbe463c8
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/notification_setting_service.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c index 979124c..1817dda 100644 --- a/src/notification_setting_service.c +++ b/src/notification_setting_service.c @@ -565,10 +565,12 @@ int noti_system_setting_set_alarm(int week_flag, int hour, int min, alarm_cb_t h goto out; } - err = alarmmgr_set_repeat_mode(alarm_info, ALARM_REPEAT_MODE_WEEKLY, week_flag); - if (err != ALARMMGR_RESULT_SUCCESS) { - NOTIFICATION_ERR("alarmmgr_set_repeat_mode failed (%d)", err); - goto out; + if (week_flag) { + err = alarmmgr_set_repeat_mode(alarm_info, ALARM_REPEAT_MODE_WEEKLY, week_flag); + if (err != ALARMMGR_RESULT_SUCCESS) { + NOTIFICATION_ERR("alarmmgr_set_repeat_mode failed (%d)", err); + goto out; + } } err = alarmmgr_set_type(alarm_info, ALARM_TYPE_VOLATILE); |