+ tethering_disable(th, TETHERING_TYPE_WIFI);
+ }
+ else if (POPUP_RESPONSE_CANCEL == response_type)
+ {
+ list_item->swallow_type = SWALLOW_Type_1ICON_1RADIO;
+ list_item->chk_status = EINA_FALSE;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+ }
+}
+
+void __alternate_wifi_mode(Setting_GenGroupItem_Data *list_item, Evas_Object *check)
+{
+ SETTING_TRACE_BEGIN;
+ int ret;
+ Eina_Bool status = elm_check_state_get(check);
+ SETTING_TRACE("wifi mode status : %d", status);
+
+ int value, err;
+
+ if (tethering_is_enabled(NULL, TETHERING_TYPE_WIFI) == TRUE) {
+ list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+
+ g_main_ad->popup = setting_create_popup_with_btn(list_item,
+ g_main_ad->win_main, NULL,
+ _("Connecting Wi-Fi will turn off Mobile hotspot. Continue?"),
+ __tethering_turn_off_resp_cb,
+ 0, 2, _("IDS_COM_SK_OK"), _("IDS_COM_SK_CANCEL"));
+ } else {
+ ret = wifi_initialize();
+ if (ret < 0) {
+ setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err);
+ list_item->chk_status = value;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+ }
+ setting_retm_if(ret < 0, "*** [ERR] wifi_initialize() ***");
+
+ if (status) {
+ ret = wifi_activate(NULL, NULL);
+ if (ret < 0) {
+ setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err);
+ list_item->chk_status = value;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+ wifi_deinitialize();
+ }
+ setting_retm_if(ret < 0, "*** [ERR] wifi_activate() ***");
+ } else {
+ ret = wifi_deactivate(NULL, NULL);
+ if (ret < 0) {
+ setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err);
+ list_item->chk_status = value;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+ wifi_deinitialize();
+ }
+ setting_retm_if(ret < 0, "*** [ERR] wifi_deactivate() ***");
+ }
+
+ ret = wifi_deinitialize();
+ if (ret < 0) {
+ setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err);
+ list_item->chk_status = value;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+ }
+ setting_retm_if(ret < 0, "*** [ERR] wifi_deinitialize() ***");
+
+ list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS;
+ elm_object_item_data_set(list_item->item, list_item);
+ elm_genlist_item_update(list_item->item);
+
+ }