[TSAM-9359] Modify notification icon in case of multi missed calls 39/97339/1
authorsinikang <sinikang@samsung.com>
Mon, 14 Nov 2016 02:09:55 +0000 (11:09 +0900)
committersinikang <sinikang@samsung.com>
Mon, 14 Nov 2016 02:09:55 +0000 (11:09 +0900)
 - thumbnail and sub icon path set as NULL

Change-Id: Iab550f0e041e54f1a444bcbcc2c691b30f21091f

module/src/callmgr-contact.c
packaging/call-manager.spec [changed mode: 0755->0644]

index c31f87b..a10fd3a 100644 (file)
@@ -978,38 +978,52 @@ static void __callmgr_ct_add_notification(int missed_cnt)
                err("Fail to notification_set_image : %d", noti_err);
        }
 
-       noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB, NOTIFY_MISSED_CALL_ICON_SUB);
-       if (noti_err != NOTIFICATION_ERROR_NONE) {
-               err("Fail to notification_set_image : %d", noti_err);
-       }
+       if (b_is_single == true) {
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB, NOTIFY_MISSED_CALL_ICON_SUB);
+               if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       err("Fail to notification_set_image : %d", noti_err);
+               }
 
-       if (disp_img_path == NULL) {
-               disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
+               if (disp_img_path == NULL) {
+                       disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
 
-               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, disp_img_path);
+                       noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, disp_img_path);
+                       if (noti_err != NOTIFICATION_ERROR_NONE) {
+                               err("Fail to notification_set_image : %d", noti_err);
+                       }
+               } else {
+                       dbg("contact");
+
+                       noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, disp_img_path);
+                       if (noti_err != NOTIFICATION_ERROR_NONE) {
+                               err("Fail to notification_set_image : %d", noti_err);
+                       }
+               }
+
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK, disp_img_path);
+               if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       err("Fail to notification_set_image : %d", noti_err);
+               }
+       } else {
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB, NULL);
                if (noti_err != NOTIFICATION_ERROR_NONE) {
                        err("Fail to notification_set_image : %d", noti_err);
                }
-       } else if (b_is_single == false) {
-               g_free(disp_img_path);
-               disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
 
-               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, disp_img_path);
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, NULL);
                if (noti_err != NOTIFICATION_ERROR_NONE) {
                        err("Fail to notification_set_image : %d", noti_err);
                }
-       } else {
-               dbg("contact");
 
-               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, disp_img_path);
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, NOTIFY_MISSED_CALL_IND_ICON);
                if (noti_err != NOTIFICATION_ERROR_NONE) {
                        err("Fail to notification_set_image : %d", noti_err);
                }
-       }
 
-       noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK, disp_img_path);
-       if (noti_err != NOTIFICATION_ERROR_NONE) {
-               err("Fail to notification_set_image : %d", noti_err);
+               noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK, NOTIFY_MISSED_CALL_ICON);
+               if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       err("Fail to notification_set_image : %d", noti_err);
+               }
        }
 
        noti_err = notification_set_pkgname(noti, CONTACTS_PKG);
old mode 100755 (executable)
new mode 100644 (file)
index 3d734cd..936c641
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 80
+%define patchlevel 81
 %define ext_feature 0
 
 Name:           call-manager