[TSAM-8550] Display user profile image as circle shape on notification panel 16/91316/1
authorsinikang <sinikang@samsung.com>
Fri, 7 Oct 2016 02:20:03 +0000 (11:20 +0900)
committersinikang <sinikang@samsung.com>
Fri, 7 Oct 2016 02:20:03 +0000 (11:20 +0900)
  - apply NOTIFICATION_IMAGE_TYPE_THUMBNAIL

Change-Id: Ica400261ce7ac629a009bb5d97f8e3cf9a80a20a

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

index 3a1c66d..5529125 100644 (file)
@@ -902,15 +902,6 @@ static void __callmgr_ct_add_notification(int missed_cnt)
        contacts_query_destroy(query);
        contacts_disconnect();
 
-       if (disp_img_path == NULL){
-               disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
-       } else if (b_is_single == false) {
-               g_free(disp_img_path);
-               disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
-       } else {
-               dbg("contact");
-       }
-
        noti_flags = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_LOCK | NOTIFICATION_DISPLAY_APP_INDICATOR | NOTIFICATION_DISPLAY_APP_TICKER;
        noti_err = notification_set_display_applist(noti, noti_flags);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
@@ -927,12 +918,31 @@ 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_FOR_LOCK, disp_img_path);
-       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);
+
+               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 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);
+               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, disp_img_path);
+       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);
        }
@@ -1146,10 +1156,6 @@ static void __callmgr_ct_add_rec_reject_notification(char *number, int person_id
                app_control_destroy(service);
        }
 
-       if (disp_img_path == NULL) {
-               disp_img_path = g_strdup(NOTIFY_MISSED_CALL_ICON);
-       }
-
        noti_err = notification_set_time(noti, time(NULL));
        if (noti_err != NOTIFICATION_ERROR_NONE) {
                err("Fail to notification_set_time : %d", noti_err);
@@ -1181,12 +1187,21 @@ static void __callmgr_ct_add_rec_reject_notification(char *number, int person_id
                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);
+       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);
+               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_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, disp_img_path);
+       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);
        }
old mode 100644 (file)
new mode 100755 (executable)
index d610265..8190c91
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 73
+%define patchlevel 74
 %define ext_feature 0
 
 Name:           call-manager