From: Radoslaw Czerski Date: Tue, 15 Nov 2016 14:58:10 +0000 (+0100) Subject: [TSAM-9853] ticker: Remove do_not_disturb check. X-Git-Tag: submit/tizen/20161117.163911~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F98001%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Findicator.git [TSAM-9853] ticker: Remove do_not_disturb check. Dnd is performed in data-provider-master(notification daemon) and should not be performed in indicator. Change-Id: I44003bc3e6623b269ef17d3e53e8cf023192a865 Signed-off-by: Radoslaw Czerski --- diff --git a/src/ticker.c b/src/ticker.c index 9780bae..600fe1f 100644 --- a/src/ticker.c +++ b/src/ticker.c @@ -99,49 +99,6 @@ static int _is_security_lockscreen_launched(void) return 0; } -static bool _is_do_not_disturb(notification_h noti) -{ - if (!noti) - return false; - - notification_system_setting_h system_setting; - bool do_not_disturb = true; - - notification_setting_h noti_setting; - char *pkgname = NULL; - bool do_not_disturb_exception = false; - - int ret = notification_system_setting_load_system_setting(&system_setting); - retvm_if(ret != NOTIFICATION_ERROR_NONE || !system_setting, true, - "notification_system_setting_load_system_setting failed: %s", get_error_message(ret)); - - ret = notification_system_setting_get_do_not_disturb(system_setting, &do_not_disturb); - if (ret != NOTIFICATION_ERROR_NONE) - _E("notification_system_setting_get_do_not_disturb failed: %s", get_error_message(ret)); - - notification_system_setting_free_system_setting(system_setting); - - - ret = notification_get_pkgname(noti, &pkgname); - retvm_if(ret != NOTIFICATION_ERROR_NONE || !pkgname, true, - "notification_get_pkgname failed: %s", get_error_message(ret)); - - ret = notification_setting_get_setting_by_package_name(pkgname, ¬i_setting); - retvm_if(ret != NOTIFICATION_ERROR_NONE || !noti_setting, true, - "notification_setting_get_setting_by_package_name failed: %s", get_error_message(ret)); - - ret = notification_setting_get_do_not_disturb_except(noti_setting, &do_not_disturb_exception); - if (ret != NOTIFICATION_ERROR_NONE) - _E("notification_setting_get_do_not_disturb_except failed: %s", get_error_message(ret)); - - notification_setting_free_notification(noti_setting); - - _D("do_not_disturb = %d, do_not_disturb_exception = %d", do_not_disturb, do_not_disturb_exception); - - return do_not_disturb && !do_not_disturb_exception; - -} - static bool _notification_accept(notification_h noti) { retv_if(!noti, false); @@ -750,12 +707,6 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ return; } - if (_is_do_not_disturb(op_list->noti)) { - _E("Do not disturb"); - _request_to_delete_noti(op_list->noti); - return; - } - ticker_info_s *ticker_info = _ticker_noti_create(op_list->noti); retm_if(!ticker_info, "_ticker_noti_create failed");