TSAM-12366 incomming Call screen still display although phone is blocked notification 36/135436/1
authorOleksander Kostenko <o.kostenko@samsung.com>
Tue, 10 Jan 2017 09:48:18 +0000 (11:48 +0200)
committerOleksander Kostenko <o.kostenko@samsung.com>
Thu, 22 Jun 2017 09:06:45 +0000 (12:06 +0300)
Change-Id: I818967a491e74c8ad692229f24b94a41306f0d7c
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
src/notification-setting-info.c
src/set-schedule-info.c

index 4abaa58..8d89201 100755 (executable)
@@ -23,7 +23,7 @@
 
 setting_info_s *setting_info = NULL;
 
-#define VOICE_CALL_PACKAGE "org.tizen.call-ui"
+#define PHONE_PACKAGE "org.tizen.phone"
 #define CALENDAR_PACKAGE "org.tizen.calendar"
 #define MESSAGES_PACKAGE "org.tizen.message"
 /* TODO: we have no clock on device, when it will be add, we will need to change package id */
@@ -34,7 +34,7 @@ Eina_Bool create_app_notification_list()
        NOTISET_TRACE_BEGIN;
        int i = 0;
        int count = 0;
-       char *package_name = NULL;
+       char *package_id = NULL;
        bool allow_to_notify = false;
        bool do_not_disturb_except = false;
        notification_setting_h setting_array = NULL;
@@ -56,8 +56,8 @@ Eina_Bool create_app_notification_list()
 
                temp = setting_array + i;
 
-               notification_setting_get_appid(temp, &package_name);
-               item_info->appid = package_name;
+               notification_setting_get_appid(temp, &package_id);
+               item_info->appid = package_id;
 
                notification_setting_get_allow_to_notify(temp, &allow_to_notify);
                item_info->allow_to_notify = allow_to_notify;
@@ -65,20 +65,20 @@ Eina_Bool create_app_notification_list()
                notification_setting_get_do_not_disturb_except(temp, &do_not_disturb_except);
                item_info->do_not_disturb_except = do_not_disturb_except;
 
-               item_info->icon = get_app_icon(package_name);
-               item_info->name = get_app_name(package_name);
+               item_info->icon = get_app_icon(package_id);
+               item_info->name = get_app_name(package_id);
 
                item_info->index = i;
 
-               if (item_info->name && strcmp(package_name, VOICE_CALL_PACKAGE)
-                                                       && strcmp(package_name, CALENDAR_PACKAGE)
-                                                       && strcmp(package_name, CLOCK_PACKAGE)) {
+               if (item_info->name && strcmp(package_id, CALENDAR_PACKAGE)
+                                                       && strcmp(package_id, CLOCK_PACKAGE)
+                                                       && strcmp(package_id, PHONE_PACKAGE)) {
                        if (item_info->allow_to_notify)
                                setting_info->apps_noti_allowed_list = eina_list_append(setting_info->apps_noti_allowed_list, item_info);
                        else
                                setting_info->apps_noti_blocked_list = eina_list_append(setting_info->apps_noti_blocked_list, item_info);
                } else {
-                       FREEIF(package_name);
+                       FREEIF(package_id);
                        FREEIF(item_info->name);
                        FREEIF(item_info->icon);
                        FREEIF(item_info);
@@ -149,7 +149,7 @@ void create_do_not_disturb_application_list()
 
                        item_info->index = i;
 
-                       if (item_info->name) {
+                       if (item_info->name && strcmp(package_id, PHONE_PACKAGE)) {
                                if ((allow_to_notify && !strcmp(package_id, MESSAGES_PACKAGE))
                                                || !strcmp(package_id, CLOCK_PACKAGE)
                                                || !strcmp(package_id, CALENDAR_PACKAGE)) {
index d4eb836..9795dae 100755 (executable)
@@ -248,16 +248,8 @@ bool load_dnd_schedule_time(struct tm *start_time_out, struct tm *end_time_out)
        end_time_p.saved_time.tm_sec = 0;
 
        notification_system_setting_dnd_schedule_get_start_time(get_system_setting(), &start_time_p.saved_time.tm_hour, &start_time_p.saved_time.tm_min);
-       if (start_time_p.saved_time.tm_hour == 0 && start_time_p.saved_time.tm_min == 0) {
-               start_time_p.saved_time.tm_hour = 22;
-               notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), start_time_p.saved_time.tm_hour, start_time_p.saved_time.tm_min);
-       }
 
        notification_system_setting_dnd_schedule_get_end_time(get_system_setting(), &end_time_p.saved_time.tm_hour, &end_time_p.saved_time.tm_min);
-       if (end_time_p.saved_time.tm_hour == 0 && end_time_p.saved_time.tm_min == 0) {
-               end_time_p.saved_time.tm_hour = 8;
-               notification_system_setting_dnd_schedule_set_start_time(get_system_setting(), end_time_p.saved_time.tm_hour, end_time_p.saved_time.tm_min);
-       }
 
        start_time_p.default_time = start_time_p.saved_time;
        end_time_p.default_time = end_time_p.saved_time;