From 32b7690b409c32e1a678df45b0d4a157497fae92 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Fri, 22 Apr 2016 15:40:26 +0900 Subject: [PATCH] Remove unused type (TETHERING_TYPE_RESERVED) Change-Id: I9349e3cf6ffbe609f8aca637321bfe95c03521b4 Signed-off-by: Seonah Moon --- packaging/ug-setting-wifidirect-efl.spec | 2 +- ug-wifidirect/src/wfd_client.c | 29 ++--------------------------- ug-wifidirect/ug-setting-wifidirect-efl.xml | 1 + 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/packaging/ug-setting-wifidirect-efl.spec b/packaging/ug-setting-wifidirect-efl.spec index 3fd62f7..cd6b30f 100644 --- a/packaging/ug-setting-wifidirect-efl.spec +++ b/packaging/ug-setting-wifidirect-efl.spec @@ -1,6 +1,6 @@ Name: ug-setting-wifidirect-efl Summary: Wi-Fi Direct setting UI gadget -Version: 1.11.73 +Version: 1.11.74 Release: 1 Group: Applications/Network License: Flora-1.1 diff --git a/ug-wifidirect/src/wfd_client.c b/ug-wifidirect/src/wfd_client.c index 9f34b68..c073d08 100644 --- a/ug-wifidirect/src/wfd_client.c +++ b/ug-wifidirect/src/wfd_client.c @@ -194,7 +194,6 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether tethering_error_e ret = TETHERING_ERROR_NONE; tethering_h th = NULL; bool is_wifi_enabled = false; - bool is_wifi_ap_enabled = false; if (error != TETHERING_ERROR_NONE) { if (code != TETHERING_DISABLED_BY_REQUEST) { @@ -208,10 +207,8 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether th = ugd->hotspot_handle; if (th != NULL) { is_wifi_enabled = tethering_is_enabled(th, TETHERING_TYPE_WIFI); - is_wifi_ap_enabled = tethering_is_enabled(th, TETHERING_TYPE_RESERVED); - if (is_wifi_enabled || is_wifi_ap_enabled) { + if (is_wifi_enabled) { DBG(LOG_ERROR, "error !!! TETHERING is not disabled.\n"); - DBG(LOG_ERROR, "is_wifi_enabled:%d is_wifi_ap_enabled:%d\n", is_wifi_enabled, is_wifi_ap_enabled); return; } @@ -223,11 +220,6 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); } - ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_RESERVED); - if (ret != TETHERING_ERROR_NONE) { - DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); - } - /* Destroy tethering handle */ ret = tethering_destroy(th); if (ret != TETHERING_ERROR_NONE) { @@ -298,10 +290,8 @@ int wfd_mobile_ap_off(void *data) WFD_RETV_IF(ugd == NULL || ugd->hotspot_handle == NULL, -1, "Incorrect parameter(NULL)\n"); tethering_error_e ret = TETHERING_ERROR_NONE; bool is_wifi_enabled = false; - bool is_wifi_ap_enabled = false; is_wifi_enabled = tethering_is_enabled(ugd->hotspot_handle, TETHERING_TYPE_WIFI); - is_wifi_ap_enabled = tethering_is_enabled(ugd->hotspot_handle, TETHERING_TYPE_RESERVED); if (is_wifi_enabled) { /* Register cbs */ @@ -312,13 +302,6 @@ int wfd_mobile_ap_off(void *data) } /* Disable tethering */ ret = tethering_disable(ugd->hotspot_handle, TETHERING_TYPE_WIFI); - } else if (is_wifi_ap_enabled) { - ret = tethering_set_disabled_cb(ugd->hotspot_handle, TETHERING_TYPE_RESERVED, __disabled_cb, ugd); - if (ret != TETHERING_ERROR_NONE) { - DBG(LOG_ERROR, "tethering_set_disabled_cb is failed\n", ret); - return -1; - } - ret = tethering_disable(ugd->hotspot_handle, TETHERING_TYPE_RESERVED); } if (ret != TETHERING_ERROR_NONE) { @@ -1533,11 +1516,6 @@ void wfd_client_destroy_tethering(struct ug_data *ugd) DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); } - ret = tethering_unset_disabled_cb(ugd->hotspot_handle, TETHERING_TYPE_RESERVED); - if (ret != TETHERING_ERROR_NONE) { - DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); - } - /* Destroy tethering handle */ ret = tethering_destroy(ugd->hotspot_handle); if (ret != TETHERING_ERROR_NONE) { @@ -1657,8 +1635,6 @@ int wfd_client_switch_on(void *data) int res; bool is_wifi_enabled = false; - bool is_wifi_ap_enabled = false; - if(!ugd->is_init_ok) { DBG(LOG_ERROR, "device is initializing, please wait\n"); @@ -1689,7 +1665,6 @@ int wfd_client_switch_on(void *data) } is_wifi_enabled = tethering_is_enabled(ugd->hotspot_handle, TETHERING_TYPE_WIFI); - is_wifi_ap_enabled = tethering_is_enabled(ugd->hotspot_handle, TETHERING_TYPE_RESERVED); #ifndef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE if (wifi_state > VCONFKEY_WIFI_OFF) { @@ -1698,7 +1673,7 @@ int wfd_client_switch_on(void *data) } else #endif /* MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE */ - if (is_wifi_enabled || is_wifi_ap_enabled) { + if (is_wifi_enabled) { DBG(LOG_INFO, "WiFi is connected, so have to turn off WiFi"); wfd_ug_act_popup(ugd, D_("IDS_WIFI_BODY_USING_WI_FI_DIRECT_WILL_DISCONNECT_CURRENT_WI_FI_TETHERING_CONTINUE_Q"), POPUP_TYPE_HOTSPOT_OFF); } else diff --git a/ug-wifidirect/ug-setting-wifidirect-efl.xml b/ug-wifidirect/ug-setting-wifidirect-efl.xml index 7e31d0e..1f48ca5 100644 --- a/ug-wifidirect/ug-setting-wifidirect-efl.xml +++ b/ug-wifidirect/ug-setting-wifidirect-efl.xml @@ -14,5 +14,6 @@ http://tizen.org/privilege/wifidirect http://tizen.org/privilege/notification http://tizen.org/privilege/haptic + http://tizen.org/privilege/tethering.admin -- 2.7.4