Added a send_message function for the instant notification
authorjin0.kim <jin0.kim@samsung.com>
Wed, 10 Aug 2016 05:31:52 +0000 (14:01 +0830)
committercskim <charles0.kim@samsung.com>
Tue, 23 Aug 2016 02:44:27 +0000 (11:44 +0900)
Change-Id: I10d95c488cf2fc5d91f75a50550c73d0664b851c

18 files changed:
inc/common.h
inc/common_uic.h
inc/settings_icon_common.h
src/common.c
src/common_uic.c
src/datetime/datetime.c
src/minictrl/minictrl.c
src/notifications/activenoti.c
src/notifications/noti.c
src/quickpanel-ui.c
src/settings/modules/bluetooth.c
src/settings/modules/gps.c
src/settings/modules/rotate-lock.c
src/settings/modules/sound-profile.c
src/settings/modules/wifi.c
src/settings/setting_module_api.c
src/settings/settings_icon_common.c
src/voice_control.c

index 6bc3446..9dfb200 100755 (executable)
@@ -160,6 +160,9 @@ extern char *quickpanel_common_ui_get_pkginfo_icon(const char *pkgid);
 extern char *quickpanel_common_ui_get_pkginfo_label(const char *pkgid);
 extern int quickpanel_common_ui_is_package_exist(const char *pkgid);
 extern char *quickpanel_common_ui_get_appinfo_icon(const char *pkgid);
+extern void quickpanel_common_inform_launch_app_result(const char *pkgname, int retcode);
+extern int quickpanel_common_send_message_to_app(const char *app_id, const char *operation, const char *key, const char *value);
+extern int quickpanel_common_launch_app(char *app_id, void *data);
 
 enum app_subdir {
        APP_DIR_DATA,
index 2191b25..21396dc 100755 (executable)
@@ -25,13 +25,11 @@ typedef enum {
        OPENED_BY_CMD_SHOW_SETTINGS = 2,
 } qp_open_reason;
 
+
 extern Evas_Object *quickpanel_uic_load_edj(Evas_Object * parent, const char *file, const char *group, int is_just_load);
-extern int quickpanel_uic_launch_app(char *app_id, void *data);
-extern int quickpanel_uic_launch_ug_by_appcontrol(const char *package, void *data);
 extern int quickpanel_uic_is_emul(void);
 extern int quickpanel_uic_is_suspended(void);
 extern int quickpanel_uic_is_opened(void);
-extern void quickpanel_uic_launch_app_inform_result(const char *pkgname, int retcode);
 extern void quickpanel_uic_initial_resize(Evas_Object *obj, int height);
 extern void quickpanel_uic_close_quickpanel(bool is_check_lock, int is_delay_needed);
 extern void quickpanel_uic_open_quickpanel(int reason);
@@ -39,4 +37,5 @@ extern void quickpanel_uic_toggle_openning_quickpanel(void);
 extern void quickpanel_uic_opened_reason_set(int reason);
 extern int quickpanel_uic_opened_reason_get(void);
 
+
 #endif                         /* __QP_COMMON_UIC_H_ */
index 7b16e93..30fd733 100755 (executable)
@@ -22,6 +22,6 @@
 extern int quickpanel_setting_icon_click_cb_add(Evas_Object *icon, Edje_Signal_Cb func, void *data);
 extern int quickpanel_setting_icon_click_cb_without_feedback_add(Evas_Object *icon, Edje_Signal_Cb func, void *data);
 extern int quickpanel_setting_icon_click_cb_del(Evas_Object *icon, Edje_Signal_Cb func);
-extern void quickpanel_setting_icon_handler_longpress(const char *pkgname, void *data);
+extern void quickpanel_setting_icon_handler_longpress(const char *pkgname, const char *key, const char *value);
 
 #endif /* __SETTING_ICON_COMMON_H__ */
index 7ad2d07..4ea1881 100755 (executable)
 #include <tzsh_quickpanel_service.h>
 #include <E_DBus.h>
 #include <app_common.h>
+#include <app_control.h>
+#include <app_control_internal.h>
+#include <bundle_internal.h>
+#include <notification.h>
+
 #include "common.h"
+
 #include "quickpanel-ui.h"
 
 static inline int _is_space(char in)
@@ -428,6 +434,133 @@ HAPI int quickpanel_common_ui_is_package_exist(const char *pkgid)
        return 1;
 }
 
+static void _quickpanel_move_data_to_service(const char *key, const char *val, void *data)
+{
+       retif(data == NULL || key == NULL || val == NULL, , "Invialid parameter!");
+
+       app_control_h service = data;
+       app_control_add_extra_data(service, key, val);
+}
+
+HAPI void quickpanel_common_inform_launch_app_result(const char *pkgname, int retcode)
+{
+       retif(retcode == APP_CONTROL_ERROR_NONE, , "retcode = APP_CONTROL_ERROR_NONE!");
+       retif(pkgname == NULL && retcode != APP_CONTROL_ERROR_APP_NOT_FOUND, , "Invialid parameter!");
+
+       const char *msg = NULL;
+       char *app_label = NULL;
+
+       if (retcode == APP_CONTROL_ERROR_APP_NOT_FOUND) {
+               notification_status_message_post(_NOT_LOCALIZED("Unable to find application to perform this action."));
+       } else {
+               Eina_Strbuf *strbuf = eina_strbuf_new();
+               char *format = _("IDS_QP_TPOP_UNABLE_TO_OPEN_PS");
+
+               if (strbuf != NULL) {
+                       app_label = quickpanel_common_ui_get_pkginfo_label(pkgname);
+                       if (app_label != NULL) {
+                               eina_strbuf_append_printf(strbuf, format, app_label);
+                               free(app_label);
+                       } else {
+                               eina_strbuf_append_printf(strbuf, format, pkgname);
+                       }
+                       eina_strbuf_append_printf(strbuf, "(%x)", retcode);
+                       msg = eina_strbuf_string_get(strbuf);
+
+                       if (msg != NULL) {
+                               notification_status_message_post(msg);
+                       }
+                       eina_strbuf_free(strbuf);
+               }
+       }
+}
+
+HAPI int quickpanel_common_send_message_to_app(const char *app_id, const char *operation, const char *key, const char *value)
+{
+       int ret = APP_CONTROL_ERROR_NONE;
+       app_control_h service = NULL;
+
+       retif(app_id == NULL && operation == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "Invialid parameter!");
+
+       ret = app_control_create(&service);
+       if (ret != APP_CONTROL_ERROR_NONE || service == NULL) {
+               ERR("app_control_create() return error : %d", ret);
+               return ret;
+       }
+
+       if (app_id != NULL) {
+               app_control_set_app_id(service, app_id);
+       } else {
+               DBG("Implicit app_control, %s", operation?operation:"-");
+       }
+
+       if (operation != NULL) {
+               app_control_set_operation(service, operation);
+       } else {
+               app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
+       }
+
+       if (key != NULL && value != NULL) {
+               app_control_add_extra_data(service, key, value);
+       }
+
+       ret = app_control_send_launch_request(service, NULL, NULL);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               ERR("app_control_send_launch_request() is failed : %d", ret);
+       }
+
+       app_control_destroy(service);
+
+       return ret;
+}
+
+HAPI int quickpanel_common_launch_app(char *app_id, void *data)
+{
+       int ret = APP_CONTROL_ERROR_NONE;
+       app_control_h service = NULL;
+       char *app_id_from_service = NULL;
+
+       retif(app_id == NULL && data == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "Invialid parameter!");
+
+       ret = app_control_create(&service);
+       if (ret != APP_CONTROL_ERROR_NONE || service == NULL) {
+               ERR("app_control_create() return error : %d", ret);
+               return ret;
+       }
+
+       if (app_id != NULL) {
+               app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
+               app_control_set_app_id(service, app_id);
+
+               if (data != NULL) {
+                       bundle_iterate((bundle *)data, _quickpanel_move_data_to_service, service);
+               }
+       } else {
+               if (data != NULL) {
+                       ret = app_control_import_from_bundle(service, (bundle *)data);
+                       if (ret != APP_CONTROL_ERROR_NONE) {
+                               ERR("Failed to import[%d]", ret);
+                       }
+               }
+       }
+
+       ret = app_control_send_launch_request(service, NULL, NULL);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               ERR("app_control_send_launch_request() is failed : %d", ret);
+               app_control_get_app_id(service, &app_id_from_service);
+               if (app_id_from_service != NULL) {
+                       quickpanel_common_inform_launch_app_result(app_id_from_service, ret);
+                       free(app_id_from_service);
+               } else {
+                       quickpanel_common_inform_launch_app_result(app_id, ret);
+               }
+               app_control_destroy(service);
+               return ret;
+       }
+       app_control_destroy(service);
+       return ret;
+}
+
 const char *util_get_file_path(enum app_subdir dir, const char *relative)
 {
        static char buf[PATH_MAX];
index acfbac9..c75b5ba 100755 (executable)
@@ -25,7 +25,6 @@
 #include <appcore-common.h>
 #include <notification.h>
 #include <app_control_internal.h>
-#include <bundle_internal.h>
 #include <system_info.h>
 
 #include <tzsh.h>
 static Ecore_Timer *_close_timer = NULL;
 
 
-static void _quickpanel_move_data_to_service(const char *key, const char *val, void *data)
-{
-       retif(data == NULL || key == NULL || val == NULL, , "Invialid parameter!");
-
-       app_control_h service = data;
-       app_control_add_extra_data(service, key, val);
-}
 
 HAPI Evas_Object *quickpanel_uic_load_edj(Evas_Object * parent, const char *file, const char *group, int is_just_load)
 {
@@ -125,119 +117,6 @@ HAPI void quickpanel_uic_initial_resize(Evas_Object *obj, int height)
        }
 }
 
-HAPI int quickpanel_uic_launch_app(char *app_id, void *data)
-{
-       int ret = APP_CONTROL_ERROR_NONE;
-       app_control_h service = NULL;
-       char *app_id_from_service = NULL;
-
-       retif(app_id == NULL && data == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "Invialid parameter!");
-
-       ret = app_control_create(&service);
-       if (ret != APP_CONTROL_ERROR_NONE) {
-               ERR("app_control_create() return error : %d", ret);
-               return ret;
-       }
-       retif(service == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "fail to create service handle!");
-
-       if (app_id != NULL) {
-               app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
-               app_control_set_app_id(service, app_id);
-
-               if (data != NULL) {
-                       bundle_iterate((bundle *)data, _quickpanel_move_data_to_service, service);
-               }
-       } else {
-               if (data != NULL) {
-                       ret = app_control_import_from_bundle(service, data);
-                       if (ret != APP_CONTROL_ERROR_NONE) {
-                               ERR("Failed to import[%d]", ret);
-                       }
-               }
-       }
-
-       ret = app_control_send_launch_request(service, NULL, NULL);
-       if (ret != APP_CONTROL_ERROR_NONE) {
-               ERR("app_control_send_launch_request() is failed : %d", ret);
-               app_control_get_app_id(service, &app_id_from_service);
-               if (app_id_from_service != NULL) {
-                       quickpanel_uic_launch_app_inform_result(app_id_from_service, ret);
-                       free(app_id_from_service);
-               } else {
-                       quickpanel_uic_launch_app_inform_result(app_id, ret);
-               }
-               app_control_destroy(service);
-               return ret;
-       }
-       app_control_destroy(service);
-       return ret;
-}
-
-HAPI int quickpanel_uic_launch_ug_by_appcontrol(const char *package, void *data)
-{
-       int ret = APP_CONTROL_ERROR_NONE;
-       app_control_h service = NULL;
-       struct appdata *ad = quickpanel_get_app_data();
-       retif(ad == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "ad null");
-       retif(package == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "package null");
-
-       ret = app_control_create(&service);
-       if (ret != APP_CONTROL_ERROR_NONE) {
-               ERR("app_control_create() return error : %d", ret);
-               return ret;
-       }
-       retif(service == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "fail to create service handle!");
-
-       app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
-       app_control_set_app_id(service, package);
-
-       if (data != NULL) {
-               bundle_iterate((bundle *)data, _quickpanel_move_data_to_service, service);
-       }
-
-       ret = app_control_send_launch_request(service, NULL, NULL);
-       if (ret != APP_CONTROL_ERROR_NONE) {
-               ERR("app_control_send_launch_request() is failed : %d", ret);
-               app_control_destroy(service);
-               return ret;
-       }
-       app_control_destroy(service);
-       return ret;
-}
-
-HAPI void quickpanel_uic_launch_app_inform_result(const char *pkgname, int retcode)
-{
-       retif(retcode == APP_CONTROL_ERROR_NONE, , "retcode = APP_CONTROL_ERROR_NONE!");
-       retif(pkgname == NULL && retcode != APP_CONTROL_ERROR_APP_NOT_FOUND, , "Invialid parameter!");
-
-       const char *msg = NULL;
-       char *app_label = NULL;
-
-       if (retcode == APP_CONTROL_ERROR_APP_NOT_FOUND) {
-               notification_status_message_post(_NOT_LOCALIZED("Unable to find application to perform this action."));
-       } else {
-               Eina_Strbuf *strbuf = eina_strbuf_new();
-               char *format = _("IDS_QP_TPOP_UNABLE_TO_OPEN_PS");
-
-               if (strbuf != NULL) {
-                       app_label = quickpanel_common_ui_get_pkginfo_label(pkgname);
-                       if (app_label != NULL) {
-                               eina_strbuf_append_printf(strbuf, format, app_label);
-                               free(app_label);
-                       } else {
-                               eina_strbuf_append_printf(strbuf, format, pkgname);
-                       }
-                       eina_strbuf_append_printf(strbuf, "(%x)", retcode);
-                       msg = eina_strbuf_string_get(strbuf);
-
-                       if (msg != NULL) {
-                               notification_status_message_post(msg);
-                       }
-                       eina_strbuf_free(strbuf);
-               }
-       }
-}
-
 HAPI void quickpanel_uic_open_quickpanel(int reason)
 {
        struct appdata *ad = quickpanel_get_app_data();
@@ -331,3 +210,5 @@ HAPI void quickpanel_uic_toggle_openning_quickpanel(void)
 {
        /* TO DO */
 }
+
+
index 8e354ab..d2154a7 100755 (executable)
@@ -111,8 +111,8 @@ static void _text_time_clicked_cb(void *data, Evas_Object *obj, void *event_info
 
        quickpanel_media_play_feedback();
 
-       ret = quickpanel_uic_launch_ug_by_appcontrol(QP_TIMEDATE_SETTING_UG, NULL);
-       quickpanel_uic_launch_app_inform_result(QP_TIMEDATE_SETTING_UG, ret);
+       ret = quickpanel_common_send_message_to_app(QP_TIMEDATE_SETTING_UG, NULL, NULL, NULL);
+       quickpanel_common_inform_launch_app_result(QP_TIMEDATE_SETTING_UG, ret);
 
        quickpanel_uic_close_quickpanel(true, 1);
 }
@@ -124,12 +124,12 @@ static void _button_setting_clicked_cb(void *data, Evas_Object *obj, void *event
 
 #ifdef QP_EMERGENCY_MODE_ENABLE
        if (quickpanel_emergency_mode_is_on()) {
-               quickpanel_uic_launch_app(PACKAGE_EMERGENCY_MODE_SETTING, NULL);
+               quickpanel_common_launch_app(PACKAGE_EMERGENCY_MODE_SETTING, NULL);
        } else {
-               quickpanel_uic_launch_app(QP_SETTING_PKG_SETTING, NULL);
+               quickpanel_common_launch_app(QP_SETTING_PKG_SETTING, NULL);
        }
 #else
-       quickpanel_uic_launch_app(QP_SETTING_PKG_SETTING, NULL);
+       quickpanel_common_launch_app(QP_SETTING_PKG_SETTING, NULL);
 #endif
        quickpanel_uic_close_quickpanel(true, 1);
 }
index 1a83fae..928f528 100755 (executable)
@@ -346,6 +346,7 @@ static void _minictrl_remove(const char *name, void *data)
 {
        DBG("_minictrl_remove [%s]", name);
 
+
        minicontrol_viewer_send_event(name, MINICONTROL_EVENT_REQUEST_HIDE, NULL);
 
        if (s_info.prov_table) {
index aef7c0b..4c6be48 100755 (executable)
@@ -864,7 +864,7 @@ static void _noti_press_cb(void *data, Evas_Object *obj,    const char *emission, c
 
        if (responding_service_handle != NULL) {
                DBG("responding_service_handle : %s", responding_service_handle);
-               ret = quickpanel_uic_launch_app(NULL, responding_service_handle);
+               ret = quickpanel_common_launch_app(NULL, responding_service_handle);
        } else if (flag_launch == 1) {
                char *text_count = NULL;
                notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text_count);
@@ -876,19 +876,19 @@ static void _noti_press_cb(void *data, Evas_Object *obj,  const char *emission, c
                }
 
                if (single_service_handle != NULL && multi_service_handle == NULL) {
-                       ret = quickpanel_uic_launch_app(NULL, single_service_handle);
+                       ret = quickpanel_common_launch_app(NULL, single_service_handle);
                } else if (single_service_handle == NULL && multi_service_handle != NULL) {
-                       ret = quickpanel_uic_launch_app(NULL, multi_service_handle);
+                       ret = quickpanel_common_launch_app(NULL, multi_service_handle);
                } else if (single_service_handle != NULL && multi_service_handle != NULL) {
                        if (count <= 1) {
-                               ret = quickpanel_uic_launch_app(NULL, single_service_handle);
+                               ret = quickpanel_common_launch_app(NULL, single_service_handle);
                        } else {
-                               ret = quickpanel_uic_launch_app(NULL, multi_service_handle);
+                               ret = quickpanel_common_launch_app(NULL, multi_service_handle);
                        }
                } else { //single_service_handle == NULL && multi_service_handle == NULL
                        DBG("there is no execution option in notification");
                }
-               quickpanel_uic_launch_app_inform_result(caller_pkgname, ret);
+               quickpanel_common_inform_launch_app_result(caller_pkgname, ret);
        }
 
        _activenoti_hide(data , 1);
index 6538eef..6802964 100755 (executable)
@@ -293,7 +293,7 @@ static void _do_noti_press(notification_h noti, int pressed_area)
        if (pressed_area == NOTI_PRESS_BUTTON_1 && responding_service_handle != NULL) {
                DBG("");
                quickpanel_uic_close_quickpanel(true, 1);
-               ret = quickpanel_uic_launch_app(NULL, responding_service_handle);
+               ret = quickpanel_common_launch_app(NULL, responding_service_handle);
        } else if (flag_launch == 1) {
                /* Hide quickpanel */
                quickpanel_uic_close_quickpanel(true, 1);
@@ -309,21 +309,21 @@ static void _do_noti_press(notification_h noti, int pressed_area)
 
                if (single_service_handle != NULL && multi_service_handle == NULL) {
                        DBG("");
-                       ret = quickpanel_uic_launch_app(NULL, single_service_handle);
+                       ret = quickpanel_common_launch_app(NULL, single_service_handle);
                }
                if (single_service_handle == NULL && multi_service_handle != NULL) {
                        DBG("");
-                       ret = quickpanel_uic_launch_app(NULL, multi_service_handle);
+                       ret = quickpanel_common_launch_app(NULL, multi_service_handle);
                }
                if (single_service_handle != NULL && multi_service_handle != NULL) {
                        DBG("");
                        if (count <= 1) {
-                               ret = quickpanel_uic_launch_app(NULL, single_service_handle);
+                               ret = quickpanel_common_launch_app(NULL, single_service_handle);
                        } else {
-                               ret = quickpanel_uic_launch_app(NULL, multi_service_handle);
+                               ret = quickpanel_common_launch_app(NULL, multi_service_handle);
                        }
                }
-               quickpanel_uic_launch_app_inform_result(pkgname, ret);
+               quickpanel_common_inform_launch_app_result(pkgname, ret);
        }
 
        if (flag_delete == 1 && type == NOTIFICATION_TYPE_NOTI) {
@@ -1255,7 +1255,7 @@ HAPI void quickpanel_noti_on_noti_setting_clicked(void *data, Evas_Object *obj,
 
        quickpanel_media_play_feedback();
 
-       quickpanel_uic_launch_app(QP_SETTING_PKG_NOTI, NULL);
+       quickpanel_common_launch_app(QP_SETTING_PKG_NOTI, NULL);
 
        quickpanel_uic_close_quickpanel(true, 1);
 }
index c4734cc..0a1a725 100755 (executable)
 
 #define QP_WINDOW_PRIO 300
 
+#define APP_CONTROL_OPERATION_CANCEL_NOTIFICATION "http://tizen.org/appcontrol/operation/cancel_notification"
+
+#define PACKAGE_INDICATOR "org.tizen.indicator"
+
 // TODO : Due to not ready of the Secured Lockscreen, hide secured feature implementation.
 //#define _SECURED_LOCKSCREEN
 
@@ -655,6 +659,7 @@ void _event_message_cb(void *data, Evas_Object *obj, void *event_info)
                DBG("quickpanel is closed");
 
                ad->is_opened = 0;
+               quickpanel_common_send_message_to_app(PACKAGE_INDICATOR, APP_CONTROL_OPERATION_CANCEL_NOTIFICATION, NULL,  NULL);
                quickpanel_util_time_timer_enable_set(0);
                quickpanel_keyboard_closing_fini(ad);
                quickpanel_modules_closed(data);
index ea0ee59..c24f352 100755 (executable)
@@ -61,7 +61,7 @@ static const char *_icon_get(qp_setting_icon_image_type type)
 
 static void _long_press_cb(void *data)
 {
-       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
+       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL, NULL);
 }
 
 static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
index 5739b9a..4547e01 100755 (executable)
@@ -65,7 +65,7 @@ static const char *_icon_get(qp_setting_icon_image_type type)
 
 static void _long_press_cb(void *data)
 {
-       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
+       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL, NULL);
 }
 
 static void _gps_syspopup_launch(int is_on)
index 45595d9..22928eb 100755 (executable)
@@ -61,18 +61,7 @@ static const char *_icon_get(qp_setting_icon_image_type type)
 
 static void _long_press_cb(void *data)
 {
-
-       bundle *kb = bundle_create();
-       if (kb != NULL) {
-               bundle_add(kb, "viewtype", "main");
-
-               quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, kb);
-
-               bundle_free(kb);
-       } else {
-               ERR("failed to create the bunlde");
-       }
-
+       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, "viewtype", "main");
 }
 
 static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
index 5608e50..32602ea 100755 (executable)
@@ -130,7 +130,7 @@ static const char *_icon_get(qp_setting_icon_image_type type)
 
 static void _long_press_cb(void *data)
 {
-       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
+       quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL, NULL);
 
 }
 
index 1bd9c7e..1f68ff9 100755 (executable)
@@ -71,10 +71,10 @@ static const char *_icon_get(qp_setting_icon_image_type type)
 static void _long_press_cb(void *data)
 {
        if (quickpanel_common_ui_is_package_exist(PACKAGE_SETTING_MENU)) {
-               quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
+               quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL, NULL);
        } else {
                DBG("No package[%s] try[%s]", PACKAGE_SETTING_MENU, PACKAGE_SETTING_MENU_PTN);
-               quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU_PTN, NULL);
+               quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU_PTN, NULL, NULL);
        }
 }
 
@@ -361,7 +361,7 @@ static void _tethering_off_popup(Evas_Object *win, void *data, int type, const c
        int ret = APP_CONTROL_ERROR_NONE;
 
        ret = app_control_create(&service);
-       if (ret != APP_CONTROL_ERROR_NONE) {
+       if (ret != APP_CONTROL_ERROR_NONE || service == NULL) {
                ERR("Failed to create app_control[%d]", ret);
                return;
        }
index 0fa8bd6..fe6413e 100755 (executable)
@@ -304,7 +304,7 @@ HAPI void quickpanel_setting_module_syspopup_launch(char *appid, char *key, char
        retif(appid == NULL, , "Invalid parameter!");
 
        ret = app_control_create(&service);
-       if (ret != APP_CONTROL_ERROR_NONE) {
+       if (ret != APP_CONTROL_ERROR_NONE || service == NULL) {
                ERR("Failed to create app_control[%d]", ret);
                return;
        }
index ede02ab..72118b7 100755 (executable)
@@ -227,12 +227,12 @@ HAPI int quickpanel_setting_icon_click_cb_del(Evas_Object *icon, Edje_Signal_Cb
        return QP_OK;
 }
 
-HAPI void quickpanel_setting_icon_handler_longpress(const char *pkgname, void *data)
+HAPI void quickpanel_setting_icon_handler_longpress(const char *pkgname, const char *key, const char *value)
 {
        int ret;
 
-       ret = quickpanel_uic_launch_ug_by_appcontrol(pkgname, data);
-       quickpanel_uic_launch_app_inform_result(pkgname, ret);
+       ret = quickpanel_common_send_message_to_app (pkgname, NULL, key, value);
+       quickpanel_common_inform_launch_app_result(pkgname, ret);
        quickpanel_uic_close_quickpanel(true, 1);
 }
 #endif
index 12cff8d..08d1892 100755 (executable)
@@ -149,8 +149,8 @@ static void _button_clicked_cb(void *data, Evas_Object *obj, const char *emissio
 {
        DBG("_button_clicked_cb");
        int ret = 0;
-       quickpanel_uic_launch_ug_by_appcontrol(VOICE_CONTOL_REF_APP, NULL);
-       quickpanel_uic_launch_app_inform_result(VOICE_CONTOL_REF_APP, ret);
+       ret = quickpanel_common_send_message_to_app(VOICE_CONTOL_REF_APP, NULL, NULL, NULL);
+       quickpanel_common_inform_launch_app_result(VOICE_CONTOL_REF_APP, ret);
        quickpanel_uic_close_quickpanel(true, 1);
 
 }