Change the logic to check allowed_to_notify() 93/110093/4
authorMyungki Lee <mk5004.lee@samsung.com>
Tue, 17 Jan 2017 00:49:00 +0000 (09:49 +0900)
committerMyungKi Lee <mk5004.lee@samsung.com>
Tue, 17 Jan 2017 00:54:17 +0000 (16:54 -0800)
- if there is no app_control and can't get settting,
  should not check allow_to_notify and app_disabled.
- Adjust the log level because no setting is not an error.

Change-Id: I69bec78ce07c617e39f46af8b135ae0ed4bdbffc
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification_noti.c

index 338b9d3..07b6b62 100755 (executable)
@@ -722,8 +722,8 @@ static int __get_setting_from_app_control(notification_h noti, notification_sett
                                NULL,
                                &b);
        if (ret != NOTIFICATION_ERROR_NONE || b == NULL) {
-               NOTIFICATION_ERR("notification_get_execute_option failed [%x]", ret);
-               return ret;
+               NOTIFICATION_WARN("Can't get or no the excute option [%x]", ret);
+               return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
        ret = app_control_create(&app_control);
@@ -876,7 +876,7 @@ static bool _is_pop_up_notification(const char *appid, uid_t uid)
 
        err = noti_setting_service_get_setting_by_appid(appid, &setting, uid);
        if (err != NOTIFICATION_ERROR_NONE) {
-               NOTIFICATION_ERR("noti_setting_service_get_setting_by_appid failed [%d]", err);
+               NOTIFICATION_WARN("Can't get the setting for %s [%x]", appid, err);
                goto out;
        }