From 7ded861b9a705e918c8cec3e14227dc847182e4a Mon Sep 17 00:00:00 2001 From: Milind Murhekar Date: Fri, 20 Apr 2018 14:34:42 +0530 Subject: [PATCH] [ug-mobile-ap] Remove dead code Description: __send_signal_qp() function uses g_dbus_connection_emit_signal API to send "ACTIVITY" signal at "org.tizen.quickpanel" interface but the signal is not handled at quickpanel application. Change-Id: I3df758a65c19fa34d0a2ea592f4cb102d11a8f51 Signed-off-by: Milind Murhekar --- include/mh_common_utility.h | 1 - src/mh_common_utility.c | 40 ---------------------------------------- src/mh_func_onoff.c | 2 -- src/mh_main_ug.c | 2 -- src/mh_popup.c | 4 ---- 5 files changed, 49 deletions(-) diff --git a/include/mh_common_utility.h b/include/mh_common_utility.h index e6ef80c..f09321b 100755 --- a/include/mh_common_utility.h +++ b/include/mh_common_utility.h @@ -63,7 +63,6 @@ int _get_sim_state(void); connection_cellular_state_e _get_cellular_state(void); int _get_checkbox_status(tethering_type_e type); bool _set_checkbox_status(tethering_type_e type, int value); -int _send_signal_qp(const char *cmd); void _device_name_changed_cb(keynode_t *key, void *data); bool _set_vconf_prev_wifi_state(bool value); bool _get_vconf_prev_wifi_state(); diff --git a/src/mh_common_utility.c b/src/mh_common_utility.c index 6ba7260..bab0256 100644 --- a/src/mh_common_utility.c +++ b/src/mh_common_utility.c @@ -630,43 +630,3 @@ bool _get_vconf_prev_wifi_state() return value ? true : false; } - -int _send_signal_qp(const char *cmd) -{ - DBG("+\n"); - - if (cmd == NULL) { - ERR("Invalid param"); - return -1; - } - - GDBusConnection *conn = NULL; - int ret = 0; - GVariant *message = NULL; - GError *err = NULL; - - DBG("Sent dbus signal : %s\n", cmd); - - conn = g_bus_get_sync(DBUS_BUS_SYSTEM, NULL, &err); - if (err != NULL) { - ERR("Failed connection to system bus[%s]", err->message); - g_error_free(err); - err = NULL; - return -1; - } - message = g_variant_new("(ss)", "wifi_hotspot", cmd); - g_dbus_connection_emit_signal(conn, NULL, "/Org/Tizen/Quickpanel", - "org.tizen.quickpanel", "ACTIVITY", message, &err); - if (err) { - ERR("g_dbus_connection_emit_signal is failed and error is %s\n", err->message); - g_error_free(err); - ret = -1; - } - g_variant_unref(message); - - if (conn) - g_object_unref(conn); - - DBG("-\n"); - return ret; -} diff --git a/src/mh_func_onoff.c b/src/mh_func_onoff.c index e6d8caf..b251f95 100644 --- a/src/mh_func_onoff.c +++ b/src/mh_func_onoff.c @@ -110,7 +110,6 @@ gboolean _ps_recheck_timeout_cb(gpointer data) recheck_count = 0; return FALSE; } - _send_signal_qp(QP_SIGNAL_PROGRESS_ON); } else if (ad->type == TETHERING_TYPE_BT && _create_bt_tethering_on_popup(ad) < 0) { ERR("_create_bt_tethering_on_popup fail\n"); _update_tethering_item(ad, MH_STATE_NONE); @@ -666,7 +665,6 @@ int _handle_wifi_onoff_change(mh_appdata_t *ad) return -1; } #endif - _send_signal_qp(QP_SIGNAL_PROGRESS_OFF); } return 0; } diff --git a/src/mh_main_ug.c b/src/mh_main_ug.c index 6a34cf1..23aa831 100755 --- a/src/mh_main_ug.c +++ b/src/mh_main_ug.c @@ -182,8 +182,6 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, ugd->ug = ug; ad->gadget = ugd; - _send_signal_qp(QP_SIGNAL_PROGRESS_RESET); - ecore_imf_init(); ret = tethering_create(&ad->handle); diff --git a/src/mh_popup.c b/src/mh_popup.c index 2c9a088..5036723 100755 --- a/src/mh_popup.c +++ b/src/mh_popup.c @@ -96,7 +96,6 @@ static void __handle_popup_resp(void *data, bool response) _update_wifi_item(ad, MH_STATE_NONE); } _wifi_tethering_checkbox_popup_status_set(false); - _send_signal_qp(QP_SIGNAL_PROGRESS_ON); break; case MH_POPUP_BT_ON_CHECKBOX: @@ -133,7 +132,6 @@ static void __handle_popup_resp(void *data, bool response) ERR("wifi tethering off is failed : %d\n", ret); _update_wifi_item(ad, MH_STATE_NONE); } - _send_signal_qp(QP_SIGNAL_PROGRESS_OFF); break; case MH_POPUP_MOBILE_DATA_OFF: @@ -149,7 +147,6 @@ static void __handle_popup_resp(void *data, bool response) switch (popup_type) { case MH_POPUP_WIFI_ON_CHECKBOX: _update_tethering_enabling_item(ad, TETHERING_TYPE_WIFI, MH_STATE_NONE); - _send_signal_qp(QP_SIGNAL_PROGRESS_RESET); _wifi_tethering_checkbox_popup_status_set(false); break; @@ -169,7 +166,6 @@ static void __handle_popup_resp(void *data, bool response) case MH_POPUP_WIFI_OFF: _update_tethering_enabling_item(ad, TETHERING_TYPE_WIFI, MH_STATE_NONE); - _send_signal_qp(QP_SIGNAL_PROGRESS_RESET); break; case MH_POPUP_MOBILE_DATA_OFF: -- 2.7.4