From bd7dbb35894723f20dc8fb219bc0f78ee70ab731 Mon Sep 17 00:00:00 2001 From: Taesoo Jun Date: Tue, 16 Jul 2013 22:45:47 +0900 Subject: [PATCH] Disable launch UG in a notification bar Change-Id: I2e9e70c2b3cc1846ba2c11a8a3eb8f09b57936da --- packaging/mobileap-agent.spec | 2 +- src/mobileap_notification.c | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packaging/mobileap-agent.spec b/packaging/mobileap-agent.spec index 960cf2f..e73ba04 100644 --- a/packaging/mobileap-agent.spec +++ b/packaging/mobileap-agent.spec @@ -1,6 +1,6 @@ Name: mobileap-agent Summary: Mobile AP daemon for setting tethering environments -Version: 0.1.93 +Version: 0.1.94 Release: 1 Group: TO_BE/FILLED_IN License: Apache-2.0 diff --git a/src/mobileap_notification.c b/src/mobileap_notification.c index 11bb69d..16dbec4 100644 --- a/src/mobileap_notification.c +++ b/src/mobileap_notification.c @@ -25,8 +25,9 @@ #include "mobileap_agent.h" +//#define __ENABLE_UG_LAUNCH #define MH_NOTI_APP_NAME "setting-mobileap-efl" -#define MH_AGENT_PKG_NAME "mobileap-agent" +#define MH_AGENT_PKG_NAME "mobileap-agent" static int connected_noti_id = 0; static int timeout_noti_id = 0; @@ -69,7 +70,12 @@ int _create_timeout_noti(const char *content, const char *title, } ret = notification_set_property(noti, +#ifdef __ENABLE_UG_LAUNCH NOTIFICATION_PROP_VOLATILE_DISPLAY); +#else + NOTIFICATION_PROP_VOLATILE_DISPLAY | + NOTIFICATION_PROP_DISABLE_APP_LAUNCH); +#endif if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_set_property [%d]\n", ret); goto FAIL; @@ -111,13 +117,13 @@ int _create_timeout_noti(const char *content, const char *title, ERR("Fail to notification_set_pkgname [%d]\n", ret); goto FAIL; } - +#ifdef __ENABLE_UG_LAUNCH ret = notification_set_application(noti, MH_NOTI_APP_NAME); if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_set_application [%d]\n", ret); goto FAIL; } - +#endif ret = notification_insert(noti, &timeout_noti_id); if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_insert [%d]\n", ret); @@ -183,7 +189,12 @@ int _create_connected_noti(const char *content, const char *title, ret = notification_set_property(noti, NOTIFICATION_PROP_DISABLE_AUTO_DELETE | +#ifdef __ENABLE_UG_LAUNCH NOTIFICATION_PROP_VOLATILE_DISPLAY); +#else + NOTIFICATION_PROP_VOLATILE_DISPLAY | + NOTIFICATION_PROP_DISABLE_APP_LAUNCH); +#endif if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_set_property [%d]\n", ret); goto FAIL; @@ -224,13 +235,13 @@ int _create_connected_noti(const char *content, const char *title, ERR("Fail to notification_set_pkgname [%d]\n", ret); goto FAIL; } - +#ifdef __ENABLE_UG_LAUNCH ret = notification_set_application(noti, MH_NOTI_APP_NAME); if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_set_application [%d]\n", ret); goto FAIL; } - +#endif ret = notification_insert(noti, &connected_noti_id); if (ret != NOTIFICATION_ERROR_NONE) { ERR("Fail to notification_insert [%d]\n", ret); -- 2.7.4