[TSAM-9853] ticker: Remove do_not_disturb check. 01/98001/2
authorRadoslaw Czerski <r.czerski@samsung.com>
Tue, 15 Nov 2016 14:58:10 +0000 (15:58 +0100)
committerRadoslaw Czerski <r.czerski@samsung.com>
Thu, 17 Nov 2016 11:06:58 +0000 (03:06 -0800)
Dnd is performed in data-provider-master(notification daemon)
and should not be performed in indicator.

Change-Id: I44003bc3e6623b269ef17d3e53e8cf023192a865
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
src/ticker.c

index 9780bae..600fe1f 100644 (file)
@@ -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, &noti_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");