resolve TSAM-2572: set launch option for active notification 18/73618/1 accepted/tizen/common/20160609.150119 accepted/tizen/ivi/20160609.091526 accepted/tizen/mobile/20160609.091911 accepted/tizen/wearable/20160609.091520 submit/tizen/20160609.034414
authorKyeonghun Lee <kh9090.lee@samsung.com>
Thu, 9 Jun 2016 02:14:56 +0000 (11:14 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Thu, 9 Jun 2016 02:14:56 +0000 (11:14 +0900)
Change-Id: I8acbbc82643a71778d667e1bde7caa1dde3cd757
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
manager/src/msg-manager-notification.cpp

index b9c5a03..db1dc27 100644 (file)
@@ -1100,6 +1100,20 @@ void setActiveProperty(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info)
                MSG_MGR_DEBUG("Fail to notification_set_led.");
        }
 
+       /* set execute option and property */
+       switch (noti_info->type) {
+       case MSG_MGR_NOTI_TYPE_NORMAL:
+               notification_set_launch_option(noti_h, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, noti_info->active_noti_svc_h[2]);
+               notification_set_property(noti_h, NOTIFICATION_PROP_DISABLE_AUTO_DELETE);
+               break;
+       case MSG_MGR_NOTI_TYPE_CLASS0:
+               notification_set_launch_option(noti_h, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, noti_info->active_noti_svc_h[2]);
+               break;
+       default:
+               MSG_MGR_DEBUG("No matching type for notification_set_launch_option() [%d]", noti_info->type);
+               break;
+       }
+
        /* set applist */
        noti_err = notification_set_display_applist(noti_h, NOTIFICATION_DISPLAY_APP_ACTIVE);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
@@ -1264,14 +1278,6 @@ void setActiveNotification(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info
 
        int noti_err = NOTIFICATION_ERROR_NONE;
 
-       setActiveProperty(noti_h, noti_info);
-
-       setTextDomain(noti_h, noti_info->type);
-
-       setActiveText(noti_h, noti_info);
-
-       setActiveIcon(noti_h, noti_info);
-
        if (noti_info->active_noti_button_num > 1) {
                createServiceHandle(&noti_info->active_noti_svc_h[0]);
                if (noti_info->active_noti_svc_h[0]) {
@@ -1328,6 +1334,14 @@ void setActiveNotification(notification_h noti_h, MSG_MGR_NOTI_INFO_S *noti_info
                setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_BUTTON_1, "View", NULL);
        }
 
+       setActiveProperty(noti_h, noti_info);
+
+       setTextDomain(noti_h, noti_info->type);
+
+       setActiveText(noti_h, noti_info);
+
+       setActiveIcon(noti_h, noti_info);
+
        noti_err = notification_post(noti_h);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
                MSG_MGR_DEBUG("Fail to notification_post");