[TSAM-11694] Merge client list into main view
[apps/native/ug-mobile-ap.git] / src / mh_view_wifi_setup.c
old mode 100644 (file)
new mode 100755 (executable)
index 457543f..ddb0234
 * limitations under the License.
 *
 */
-#include <notification.h>
+#include <efl_extension.h>
+
+#include "mh_popup.h"
 #include "mh_view_wifi_setup.h"
+#include "mh_view_main.h"
+#include "mh_string.h"
 
-static void __back_btn_cb(void *data, Evas_Object *obj, void *event_info);
 static void __gl_realized(void *data, Evas_Object *obj, void *event_info);
+static void __cancel_btn_cb(void *data, Evas_Object *object, void *event_info);
+static void __save_btn_cb(void *data, Evas_Object *object, void *event_info);
 
-static void __input_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value)
-{
-       if (data == NULL) {
-               ERR("data is NULL\n");
-               return;
-       }
+static void __create_password_item(Evas_Object *genlist, mh_appdata_t *ad);
+static void __destroy_password_item(mh_appdata_t *ad);
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       mh_wifi_setting_view_t *st = &ad->setup;
+static guint tethering_param_timer = 0;
 
-       ad->imf_state = value;
+static void __hide_btn_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
 
-       if (st->navi_it == NULL) {
-               DBG("naviframe item is not pushed yet\n");
+       if (data == NULL || obj == NULL) {
+               ERR("Invalid param\n");
                return;
        }
 
-       if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW &&
-                       (ad->rotate_state == UG_EVENT_ROTATE_LANDSCAPE ||
-                        ad->rotate_state == UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN)) {
-               DBG("ECORE_IMF_INPUT_PANEL_STATE_SHOW and Landscape mode\n");
-               elm_naviframe_item_title_visible_set(st->navi_it, EINA_FALSE);
-       } else if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
-               DBG("ECORE_IMF_INPUT_PANEL_STATE_HIDE\n");
-               elm_naviframe_item_title_visible_set(st->navi_it, EINA_TRUE);
-       }
+       mh_appdata_t *ad = (mh_appdata_t *)data;
 
-       return;
+       ad->setup.visibility_new = !ad->setup.visibility_new;
+
+       __MOBILE_AP_FUNC_EXIT__;
 }
 
-static void __hide_btn_changed_cb(void *data, Evas_Object *obj, void *event_info)
+static bool __save_hide_btn_change(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
+       if (ad == NULL) {
                ERR("Invalid param\n");
-               return;
+               return false;
        }
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
        int ret = 0;
 
        ret = tethering_wifi_set_ssid_visibility(ad->handle,
-                       !ad->setup.visibility);
+                       ad->setup.visibility_new);
        if (ret != TETHERING_ERROR_NONE) {
                ERR("tethering_wifi_set_ssid_visibility is failed : %d\n", ret);
-               return;
+               return false;
        }
 
-       ad->setup.visibility = !ad->setup.visibility;
-
        __MOBILE_AP_FUNC_EXIT__;
+       return true;
 }
 
 static void __security_btn_changed_cb(void *data, Evas_Object *obj, void *event_info)
@@ -86,107 +80,116 @@ static void __security_btn_changed_cb(void *data, Evas_Object *obj, void *event_
        }
 
        mh_appdata_t *ad = (mh_appdata_t *)data;
-       int ret = 0;
+       mh_wifi_setting_view_t *st = &ad->setup;
 
-       if (ad->setup.security_type == TETHERING_WIFI_SECURITY_TYPE_NONE)
-               ad->setup.security_type = TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK;
-       else
-               ad->setup.security_type = TETHERING_WIFI_SECURITY_TYPE_NONE;
+       if (st->security_type_new == TETHERING_WIFI_SECURITY_TYPE_NONE) {
+               st->security_type_new = TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK;
+               if (st->pw_item == NULL)
+                       __create_password_item(st->genlist, ad);
+       } else {
+               st->security_type_new = TETHERING_WIFI_SECURITY_TYPE_NONE;
+               /* Disable password entry */
+               __destroy_password_item(ad);
+       }
 
-       ret = tethering_wifi_set_security_type(ad->handle, ad->setup.security_type);
-       if (ret != TETHERING_ERROR_NONE) {
-               ERR("tethering_wifi_set_security_type is failed : %d\n", ret);
-               return;
+       /* update wifi passphrase item */
+       if (st->security_type_new == TETHERING_WIFI_SECURITY_TYPE_NONE) {
+               elm_object_item_disabled_set(st->pw_item, EINA_TRUE);
+               elm_object_disabled_set(st->save_button, EINA_FALSE);
+       } else {
+               elm_object_item_disabled_set(st->pw_item, EINA_FALSE);
        }
 
-       elm_genlist_item_update(ad->setup.pw_item);
+       if (st->pw_item)
+               elm_genlist_item_update(st->pw_item);
 
        __MOBILE_AP_FUNC_EXIT__;
 }
 
-static char *__gl_hide_label_get(void *data, Evas_Object *obj, const char *part)
+static void __check_box_changed_cb(void *data, Evas_Object *obj, void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL || part == NULL) {
+       if (data == NULL || obj == NULL) {
                ERR("Invalid param\n");
-               return NULL;
+               return;
        }
 
-       if (strcmp(part, "elm.text") != 0) {
-               DBG("Unknown part : %s\n", part);
-               return NULL;
-       }
+       Eina_Bool state = elm_check_state_get(obj);
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       if (state)
+               elm_entry_password_set(st->pw_entry, EINA_FALSE);
+       else
+               elm_entry_password_set(st->pw_entry, EINA_TRUE);
 
        __MOBILE_AP_FUNC_EXIT__;
-       return strdup(_("IDS_MOBILEAP_BODY_HIDE_MY_DEVICE"));
+       return;
 }
 
-static char *__gl_security_label_get(void *data, Evas_Object *obj, const char *part)
+static bool __save_security_btn_change(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL || part == NULL) {
+       if (ad == NULL) {
                ERR("Invalid param\n");
-               return NULL;
+               return false;
        }
 
-       if (strcmp(part, "elm.text") != 0) {
-               DBG("Unknown part : %s\n", part);
-               return NULL;
+       int ret = 0;
+
+       ret = tethering_wifi_set_security_type(ad->handle, ad->setup.security_type_new);
+       if (ret != TETHERING_ERROR_NONE) {
+               ERR("tethering_wifi_set_security_type is failed : %d\n", ret);
+               return false;
        }
 
        __MOBILE_AP_FUNC_EXIT__;
-       return strdup(_("IDS_MOBILEAP_BODY_SECURITY"));
+       return true;
 }
 
-static char *__gl_name_label_get(void *data, Evas_Object *obj, const char *part)
+static char *__gl_device_name_title_label_get(void *data, Evas_Object *obj, const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       char *device_name_utf = NULL;
+       char *ptr = NULL;
+       char buf[MH_LABEL_LENGTH_MAX] = {0, };
 
        if (data == NULL || obj == NULL || part == NULL) {
                ERR("Invalid param\n");
                return NULL;
        }
 
-       if (strcmp(part, "elm.text") != 0) {
-               DBG("Unknown part : %s\n", part);
-               return NULL;
-       }
+       if (!strcmp("elm.text.multiline", part)) {
+               device_name_utf = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
+               if (device_name_utf == NULL)
+                       ERR("vconf_get_str failed \n");
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       char label[MH_LABEL_LENGTH_MAX] = {0, };
-       char name_change_label[MH_LABEL_LENGTH_MAX] = {0, };
-       char path[MH_LABEL_LENGTH_MAX] = {0, };
-       char *device_name = NULL;
+               ptr = elm_entry_utf8_to_markup(device_name_utf);
+               if (ptr == NULL) {
+                       ERR("elm_entry_utf8_to_markup is failed\n");
+                       free(device_name_utf);
+                       return NULL;
+               }
 
-       DBG("Device name : %s\n", ad->setup.device_name);
+               g_strlcpy(ad->setup.device_name, ptr,
+                               sizeof(ad->setup.device_name));
 
-       device_name = elm_entry_utf8_to_markup(ad->setup.device_name);
-       if (device_name == NULL) {
-               ERR("elm_entry_utf8_to_markup is failed\n");
-               return NULL;
-       }
+               snprintf(buf, MH_LABEL_LENGTH_MAX, "<font_size=30>%s</font_size><br>%s", STR_MY_DEVICE_NAME, ptr);
 
-       snprintf(path, sizeof(path), "%s > %s",
-                       S_("IDS_COM_BODY_SETTINGS"),
-                       _("IDS_ST_BODY_ABOUT_PHONE"));
-       snprintf(name_change_label, sizeof(name_change_label),
-                       _("IDS_MOBILEAP_BODY_DEVICE_NAME_CAN_BE_CHANGED_IN_PS"),
-                       path);
-       snprintf(label, sizeof(label), "%s: %s<br>%s",
-                       _("IDS_MOBILEAP_BODY_DEVICE_NAME"),
-                       device_name,
-                       name_change_label);
-       free(device_name);
+               free(device_name_utf);
+               free(ptr);
 
-       __MOBILE_AP_FUNC_EXIT__;
+               return strdup(buf);
+       }
 
-       return strdup(label);
+       __MOBILE_AP_FUNC_EXIT__;
+       return NULL;
 }
 
-static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj,
-               const char *part)
+static char *__gl_hide_label_get(void *data, Evas_Object *obj, const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
@@ -195,34 +198,14 @@ static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj,
                return NULL;
        }
 
-       if (strcmp(part, "elm.icon") != 0) {
-               DBG("Unknown part : %s\n", part);
-               return NULL;
-       }
-
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       Evas_Object *btn = NULL;
-
-       btn = elm_check_add(obj);
-       if (btn == NULL) {
-               ERR("btn is NULL\n");
-               return NULL;
-       }
-       elm_object_style_set(btn, "on&off");
-       evas_object_show(btn);
-       evas_object_pass_events_set(btn, EINA_TRUE);
-       evas_object_propagate_events_set(btn, EINA_FALSE);
-       elm_check_state_set(btn, ad->setup.visibility ? EINA_FALSE : EINA_TRUE);
-       evas_object_smart_callback_add(btn, "changed",
-                       __hide_btn_changed_cb, (void *)ad);
-       ad->setup.hide_btn = btn;
+       if (!strcmp("elm.text", part))
+               return strdup(STR_HIDE_MY_DEV);
 
        __MOBILE_AP_FUNC_EXIT__;
-       return btn;
+       return NULL;
 }
 
-static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj,
-               const char *part)
+static char *__gl_security_label_get(void *data, Evas_Object *obj, const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
@@ -231,373 +214,434 @@ static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj,
                return NULL;
        }
 
-       if (strcmp(part, "elm.icon") != 0) {
-               DBG("Unknown part : %s\n", part);
-               return NULL;
-       }
-
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       Evas_Object *btn = NULL;
-
-       btn = elm_check_add(obj);
-
-       elm_object_style_set(btn, "on&off");
-       evas_object_show(btn);
-       evas_object_pass_events_set(btn, EINA_TRUE);
-       evas_object_propagate_events_set(btn, EINA_FALSE);
-       elm_check_state_set(btn, ad->setup.security_type ==
-                       TETHERING_WIFI_SECURITY_TYPE_NONE ?
-                       EINA_FALSE : EINA_TRUE);
-       evas_object_smart_callback_add(btn, "changed",
-                       __security_btn_changed_cb, (void *)ad);
-       ad->setup.security_btn = btn;
+       if (!strcmp("elm.text", part))
+               return strdup(STR_SECURITY_TYPE);
 
        __MOBILE_AP_FUNC_EXIT__;
-       return btn;
+       return NULL;
 }
 
-static Eina_Bool __save_wifi_passphrase(mh_appdata_t *ad)
+static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj,
+               const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (ad == NULL) {
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       Evas_Object *btn = NULL;
+
+       if (data == NULL || obj == NULL || part == NULL) {
                ERR("Invalid param\n");
-               return EINA_FALSE;
+               return NULL;
        }
 
-       mh_wifi_setting_view_t *st = &ad->setup;
-       int ret = 0;
+       if (!strcmp("elm.swallow.end", part)) {
+               btn = elm_check_add(obj);
+               if (btn == NULL) {
+                       ERR("btn is NULL\n");
+                       return NULL;
+               }
 
-       ret = tethering_wifi_set_passphrase(ad->handle, st->wifi_passphrase_new);
-       if (ret != TETHERING_ERROR_NONE) {
-               ERR("tethering_wifi_set_passphrase is failed : %d\n", ret);
-               return EINA_FALSE;
+               elm_object_style_set(btn, "on&off");
+               evas_object_show(btn);
+               evas_object_pass_events_set(btn, EINA_TRUE);
+               evas_object_propagate_events_set(btn, EINA_FALSE);
+               elm_object_focus_allow_set(btn, EINA_FALSE);
+               elm_check_state_set(btn, ad->setup.visibility_new ? EINA_FALSE : EINA_TRUE);
+               evas_object_smart_callback_add(btn, "changed",
+                               __hide_btn_changed_cb, (void *)ad);
+               ad->setup.hide_btn = btn;
        }
 
-       g_strlcpy(st->wifi_passphrase, st->wifi_passphrase_new, sizeof(st->wifi_passphrase));
-
        __MOBILE_AP_FUNC_EXIT__;
-
-       return EINA_TRUE;
+       return btn;
 }
 
-static void __passphrase_maxlength_reached_cb(void *data, Evas_Object *obj,
-               void *event_info)
+static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj,
+               const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
-               ERR("The param is NULL\n");
-               return;
-       }
-
        mh_appdata_t *ad = (mh_appdata_t *)data;
-       char buf[MH_LABEL_LENGTH_MAX] = {0, };
-       int ret;
-
-       ecore_imf_input_panel_hide();
-       elm_object_focus_set(ad->setup.pw_entry, EINA_FALSE);
+       Evas_Object *btn = NULL;
 
-       if (__save_wifi_passphrase(ad) == EINA_FALSE) {
-               ERR("__save_wifi_passphrase is failed\n");
+       if (data == NULL || obj == NULL || part == NULL) {
+               ERR("Invalid param\n");
+               return NULL;
        }
 
-       snprintf(buf, sizeof(buf),
-                       _("IDS_MOBILEAP_POP_PASSWORD_MUST_CONTAIN_AT_LEAST_PD_CHARACTERS_AND_NOT_EXCEED_PD_CHARACTERS"),
-                       WIFI_PASSPHRASE_LENGTH_MIN, WIFI_PASSPHRASE_LENGTH_MAX);
-
-       ret = notification_status_message_post(buf);
-       if (ret != NOTIFICATION_ERROR_NONE)
-               ERR("notification_status_message_post() is failed : %d\n", ret);
+       if (!strcmp("elm.swallow.end", part)) {
+               btn = elm_check_add(obj);
+               elm_object_style_set(btn, "on&off");
+               evas_object_show(btn);
+               evas_object_pass_events_set(btn, EINA_TRUE);
+               evas_object_propagate_events_set(btn, EINA_FALSE);
+               elm_check_state_set(btn, ad->setup.security_type_new ==
+                               TETHERING_WIFI_SECURITY_TYPE_NONE ?
+                               EINA_FALSE : EINA_TRUE);
+               evas_object_smart_callback_add(btn, "changed",
+                               __security_btn_changed_cb, (void *)ad);
+               ad->setup.security_btn = btn;
+       }
 
        __MOBILE_AP_FUNC_EXIT__;
+       return btn;
 }
 
-static void __passphrase_activated_cb(void *data, Evas_Object *obj,
-               void *event_info)
+static bool __save_wifi_passphrase(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
+       if (ad == NULL) {
                ERR("Invalid param\n");
-               return;
+               return false;
        }
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       int ret;
-       char *ptr;
-
-       ecore_imf_input_panel_hide();
-       elm_object_focus_set(ad->setup.pw_entry, EINA_FALSE);
-
-       if (strlen(ad->setup.wifi_passphrase_new) < WIFI_PASSPHRASE_LENGTH_MIN) {
-               DBG("Password is shorter than %d\n", WIFI_PASSPHRASE_LENGTH_MIN);
-               ret = notification_status_message_post(_("IDS_ST_BODY_ENTER_PASSWORD_OF_AT_LEAST_8_CHARACTERS"));
-               if (ret != NOTIFICATION_ERROR_NONE)
-                       ERR("notification_status_message_post() is failed : %d\n", ret);
-
-               ptr = elm_entry_utf8_to_markup(ad->setup.wifi_passphrase);
-               if (ptr != NULL) {
-                       elm_entry_entry_set(ad->setup.pw_entry, ptr);
-                       free(ptr);
-               } else {
-                       ERR("elm_entry_utf8_to_markup is failed\n");
-               }
-
-               return;
-       }
+       mh_wifi_setting_view_t *st = &ad->setup;
+       int ret = 0;
 
-       if (__save_wifi_passphrase(ad) == EINA_FALSE) {
-               ERR("__save_wifi_passphrase is failed\n");
+       ret = tethering_wifi_set_passphrase(ad->handle, st->wifi_passphrase_new);
+       if (ret != TETHERING_ERROR_NONE) {
+               ERR("tethering_wifi_set_passphrase is failed : %d\n", ret);
+               return false;
        }
 
        __MOBILE_AP_FUNC_EXIT__;
-
-       return;
+       return true;
 }
 
 static void __pw_entry_changed_cb(void *data, Evas_Object *obj,
-               void *event_info)
+                               void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
-               ERR("Invalid param\n");
-               return;
-       }
-
        mh_appdata_t *ad = (mh_appdata_t *)data;
        mh_wifi_setting_view_t *st = &ad->setup;
        const char *changed_text;
        char *utf8_string;
+       int len = 0;
 
-       changed_text = elm_entry_entry_get(st->pw_entry);
+       changed_text = elm_entry_entry_get(obj);
        if (changed_text == NULL) {
                ERR("elm_entry_entry_get is failed\n");
                return;
        }
 
        utf8_string = elm_entry_markup_to_utf8(changed_text);
+
        if (utf8_string == NULL) {
                ERR("elm_entry_markup_to_utf8() Failed!!!\n");
        } else {
+               len = strlen(utf8_string);
+               if (WIFI_PASSPHRASE_LENGTH_MIN <= len) {
+                       elm_object_disabled_set(st->save_button, EINA_FALSE);
+                       elm_entry_input_panel_return_key_disabled_set(obj, FALSE);
+               } else {
+                       elm_object_disabled_set(st->save_button, EINA_TRUE);
+                       elm_entry_input_panel_return_key_disabled_set(obj, TRUE);
+               }
                g_strlcpy(st->wifi_passphrase_new, utf8_string,
-                               sizeof(st->wifi_passphrase_new));
+                                               sizeof(st->wifi_passphrase_new));
                free(utf8_string);
+               utf8_string = NULL;
        }
 
-       if (!elm_object_focus_get(st->pw_entry)) {
-               return;
-       }
-
-       if (elm_entry_is_empty(st->pw_entry)) {
-               elm_object_item_signal_emit(st->pw_item,
-                               "elm,state,eraser,hide", "");
-       } else {
-               elm_object_item_signal_emit(st->pw_item,
-                               "elm,state,eraser,show", "");
+       if (elm_object_part_content_get(obj, "elm.swallow.clear")) {
+               if (elm_object_focus_get(obj)) {
+                       if (elm_entry_is_empty(obj))
+                               elm_object_signal_emit(obj, "elm,state,clear,hidden", "");
+                       else
+                               elm_object_signal_emit(obj, "elm,state,clear,visible", "");
+               }
        }
 
        __MOBILE_AP_FUNC_EXIT__;
-
        return;
-
 }
 
-static void __pw_entry_focused_cb(void *data, Evas_Object *obj,
+static void __pw_entry_maxlength_reached_cb(void *data, Evas_Object *obj,
                void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
-               ERR("Invalid param\n");
+       if (obj == NULL) {
+               ERR("The param is NULL\n");
+               __MOBILE_AP_FUNC_EXIT__;
                return;
        }
+       char buf[MH_LABEL_LENGTH_MAX] = { 0, };
+       char *fmt = STR_PASSWORD_MIN_MAX;
+       notification_error_e ret;
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       mh_wifi_setting_view_t *st = &ad->setup;
+       snprintf(buf, sizeof(buf), fmt,
+                       WIFI_PASSPHRASE_LENGTH_MIN, WIFI_PASSPHRASE_LENGTH_MAX);
 
-       if (!elm_entry_is_empty(st->pw_entry)) {
-               elm_entry_cursor_end_set(st->pw_entry);
-               elm_object_item_signal_emit(st->pw_item,
-                               "elm,state,eraser,show", "");
-       }
+       ret = notification_status_message_post(buf);
+       if (ret != NOTIFICATION_ERROR_NONE)
+               ERR("notification_status_message_post() is failed : %d\n", ret);
 
        __MOBILE_AP_FUNC_EXIT__;
-
-       return;
-
 }
 
-static void __pw_entry_unfocused_cb(void *data, Evas_Object *obj,
-               void *event_info)
+static void __pw_entry_activated_cb(void *data, Evas_Object *obj, void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
-               ERR("Invalid param\n");
+       if (obj == NULL) {
+               ERR("Invalid parameter");
                return;
        }
 
-       mh_appdata_t *ad = (mh_appdata_t *)data;
-       mh_wifi_setting_view_t *st = &ad->setup;
+       elm_object_focus_set(obj, EINA_FALSE);
+       __MOBILE_AP_FUNC_EXIT__;
+       return;
+}
 
-       elm_object_item_signal_emit(st->pw_item,
-                       "elm,state,eraser,hide", "");
+static void __pw_entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+       evas_object_smart_callback_del(obj, "focused", __pw_entry_focused_cb);
+
+        elm_object_focus_set(obj, EINA_TRUE);
+        elm_entry_cursor_end_set(obj);
+        __MOBILE_AP_FUNC_EXIT__;
+}
 
+static void __pw_entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+       if (elm_object_part_content_get(obj, "elm.swallow.clear"))
+               elm_object_signal_emit(obj, "elm,state,clear,hidden", "");
+       elm_object_signal_emit(obj, "elm,state,focus,off", "");
        __MOBILE_AP_FUNC_EXIT__;
+}
 
-       return;
+static void __pw_entry_show_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+        evas_object_event_callback_del(obj, EVAS_CALLBACK_SHOW, __pw_entry_show_cb);
 
+        elm_object_focus_set(obj, EINA_TRUE);
+        elm_entry_cursor_end_set(obj);
+        __MOBILE_AP_FUNC_EXIT__;
 }
 
-static void __pw_layout_eraser_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void __eraser_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL) {
-               ERR("Invalid param\n");
+       elm_object_text_set(data, "");
+       elm_entry_input_panel_return_key_disabled_set(data, TRUE);
+
+       __MOBILE_AP_FUNC_EXIT__;
+}
+
+static void __pw_entry_language_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+
+       if (obj == NULL || data == NULL) {
+               ERR("NULL param\n");
                return;
        }
-
        mh_appdata_t *ad = (mh_appdata_t *)data;
        mh_wifi_setting_view_t *st = &ad->setup;
+       char buf[MH_LABEL_LENGTH_MAX];
+       char *fmt = STR_PW_GUIDE_TEXT;
 
-       elm_entry_entry_set(st->pw_entry, "");
+       snprintf(buf, sizeof(buf), fmt, WIFI_PASSPHRASE_LENGTH_MIN);
 
+       if (st->security_type_new == TETHERING_WIFI_SECURITY_TYPE_NONE) {
+               if (st->pw_item)
+                       elm_genlist_item_update(st->pw_item);
+       } else {
+               elm_object_part_text_set(obj, "elm.guide", buf);
+       }
        __MOBILE_AP_FUNC_EXIT__;
-
-       return;
-
 }
 
-static char *__gl_pw_text_get(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *__get_pw_entry(void *data, Evas_Object *parent)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL || part == NULL) {
-               ERR("Invalid parameter\n");
+       static Elm_Entry_Filter_Limit_Size limit_filter_data;
+       Evas_Object *entry = NULL;
+       char *fmt = STR_PW_GUIDE_TEXT;
+       char *ptr = NULL;
+       Evas_Object * clr_btn = NULL;
+       char buf[MH_LABEL_LENGTH_MAX];
+
+       if (parent == NULL || data == NULL) {
+               ERR("null param \n");
                return NULL;
        }
 
-       if (g_strcmp0(part, "elm.text") != 0) {
-               ERR("Invalid part : %s\n", part);
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       entry = elm_entry_add(parent);
+
+       if (entry == NULL) {
+               ERR("elm_entry_add returns NULL\n");
+               st->pw_entry = NULL;
                return NULL;
        }
 
+       elm_entry_single_line_set(entry, EINA_TRUE);
+       elm_entry_scrollable_set(entry, EINA_TRUE);
+       elm_entry_password_set(entry, EINA_TRUE);
+
+       evas_object_smart_callback_add(entry, "language,changed",
+                       __pw_entry_language_changed_cb, ad);
+
+       eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
+       elm_entry_prediction_allow_set(entry, EINA_FALSE);
+       elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
+       elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PASSWORD);
+       snprintf(buf, sizeof(buf), fmt, WIFI_PASSPHRASE_LENGTH_MIN);
+       elm_object_part_text_set(entry, "guide", buf);
+       elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT);
+
+       limit_filter_data.max_char_count = 0;
+       limit_filter_data.max_byte_count = WIFI_PASSPHRASE_LENGTH_MAX;
+       elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
+
+       if (st->security_type_new == TETHERING_WIFI_SECURITY_TYPE_NONE) {
+               elm_object_part_text_set(entry, "default", buf);
+               elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
+               elm_object_disabled_set(entry, EINA_TRUE);
+               if (st->pw_item)
+                       elm_object_item_signal_emit(st->pw_item, "elm,state,rename,hide", "");
+               return entry;
+       } else {
+               elm_object_disabled_set(entry, EINA_FALSE);
+               elm_entry_input_panel_enabled_set(entry, EINA_TRUE);
+               ptr = elm_entry_utf8_to_markup(st->wifi_passphrase_new);
+               if (ptr != NULL) {
+                       elm_object_text_set(entry, ptr);
+                       free(ptr);
+               } else {
+                       ERR("elm_entry_utf8_to_markup is failed\n");
+               }
+       }
+
+       elm_entry_input_panel_return_key_type_set(entry,
+                       ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
+
+       clr_btn = elm_button_add(entry);
+       elm_object_style_set(clr_btn, "search_clear");
+       elm_object_focus_allow_set(clr_btn, EINA_FALSE);
+       elm_object_part_content_set(entry, "elm.swallow.clear", clr_btn);
+       evas_object_smart_callback_add(clr_btn, "clicked", __eraser_btn_clicked_cb, entry);
+       evas_object_show(clr_btn);
+
+       evas_object_smart_callback_add(entry, "changed",
+                       __pw_entry_changed_cb, ad);
+       evas_object_smart_callback_add(entry, "maxlength,reached",
+                       __pw_entry_maxlength_reached_cb, ad);
+       evas_object_smart_callback_add(entry, "activated",
+                       __pw_entry_activated_cb, NULL);
+       evas_object_smart_callback_add(entry, "focused",
+                       __pw_entry_focused_cb, NULL);
+       evas_object_smart_callback_add(entry, "unfocused",
+                       __pw_entry_unfocused_cb, NULL);
+       evas_object_event_callback_add(entry, EVAS_CALLBACK_SHOW,
+                       __pw_entry_show_cb, NULL);
+
+       elm_object_focus_set(entry, EINA_TRUE);
+       elm_entry_input_panel_show(entry);
+       elm_object_part_content_set(parent, "elm.swallow.content", entry);
+
+       st->pw_entry = entry;
+
        __MOBILE_AP_FUNC_EXIT__;
-       return strdup(_("IDS_MOBILEAP_BODY_PASSWORD"));
+       return st->pw_entry;
 }
 
-static Evas_Object *__gl_pw_icon_get(void *data, Evas_Object *obj,
-               const char *part)
+static Evas_Object *__gl_pw_content_get(void *data, Evas_Object *obj, const char *part)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       if (data == NULL || obj == NULL || part == NULL) {
-               ERR("Invalid param\n");
+       int w = 720;
+       int h = 60;
+
+       if (data == NULL) {
+               ERR("data is null \n");
                return NULL;
        }
 
-       if (g_strcmp0(part, "elm.icon.entry") == 0) {
-               static Elm_Entry_Filter_Limit_Size limit_filter_data;
+       if (!strcmp(part, "elm.swallow.content")) {
+               Evas_Object *box = elm_box_add(obj);
+               Evas_Object *label = elm_label_add(box);
+               Evas_Object *layout = elm_layout_add(box);
+               char buf[MH_LABEL_LENGTH_MAX] = {0, };
 
-               mh_appdata_t *ad = (mh_appdata_t *)data;
-               mh_wifi_setting_view_t *st = &ad->setup;
-               Evas_Object *entry = NULL;
-               char *ptr = NULL;
-               Ecore_IMF_Context *imf_context;
+               elm_box_align_set(box, 0.0, 0.0);
 
-               entry = elm_entry_add(obj);
-               if (entry == NULL) {
-                       ERR("elm_entry_add returns NULL\n");
-                       st->pw_entry = NULL;
-                       return NULL;
-               }
+               /* Set label for name field */
+               snprintf(buf, MH_LABEL_LENGTH_MAX, "<text align=left><font_size=30>%s</font_size></text>", STR_PASSWORD);
+               elm_object_text_set(label, buf);
+               evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+               evas_object_size_hint_weight_set(label, 0.9, EVAS_HINT_EXPAND);
+               evas_object_size_hint_padding_set(label, ELM_SCALE_SIZE(10), ELM_SCALE_SIZE(10), 0, 0);
+               elm_box_pack_end(box, label);
+               evas_object_show(label);
 
-               /* Set single line of entry */
-               elm_entry_scrollable_set(entry, EINA_TRUE);
-               elm_entry_single_line_set(entry, EINA_TRUE);
-               elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PASSWORD);
-               elm_entry_select_allow_set(entry, EINA_FALSE);
-               elm_entry_context_menu_disabled_set(entry, EINA_TRUE);
-
-               /* Set the maximum length filter for passphrase entry */
-               limit_filter_data.max_char_count = 0;
-               limit_filter_data.max_byte_count = WIFI_PASSPHRASE_LENGTH_MAX;
-               elm_entry_markup_filter_append(entry,
-                               elm_entry_filter_limit_size, &limit_filter_data);
-
-               DBG("security_type : %d\n", st->security_type);
-               if (st->security_type == TETHERING_WIFI_SECURITY_TYPE_NONE) {
-                       ptr = elm_entry_utf8_to_markup(st->wifi_passphrase);
-                       if (ptr != NULL) {
-                               elm_entry_entry_set(entry, ptr);
-                               free(ptr);
-                       } else {
-                               ERR("elm_entry_utf8_to_markup is failed\n");
-                       }
+               /* Set layout for entry field */
+               elm_layout_theme_set(layout, "layout", "editfield", "singleline");
+               evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-                       /* Set editable mode */
-                       elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
-                       elm_object_disabled_set(entry, EINA_TRUE);
-               } else {
-                       ptr = elm_entry_utf8_to_markup(st->wifi_passphrase_new);
-                       if (ptr != NULL) {
-                               elm_entry_entry_set(entry, ptr);
-                               free(ptr);
-                       } else {
-                               ERR("elm_entry_utf8_to_markup is failed\n");
-                       }
-               }
+               __get_pw_entry(data, layout);
+               evas_object_show(layout);
+               elm_box_pack_end(box, layout);
 
-               evas_object_smart_callback_add(entry, "maxlength,reached",
-                               __passphrase_maxlength_reached_cb, data);
-               evas_object_smart_callback_add(entry, "activated",
-                               __passphrase_activated_cb, data);
-               evas_object_smart_callback_add(entry, "changed",
-                               __pw_entry_changed_cb, data);
-               evas_object_smart_callback_add(entry, "focused",
-                               __pw_entry_focused_cb, data);
-               evas_object_smart_callback_add(entry, "unfocused",
-                               __pw_entry_unfocused_cb, data);
-
-               imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(entry);
-               if (imf_context == NULL) {
-                       ERR("elm_entry_imf_context_get() is failed\n");
-               } else {
-                       ecore_imf_context_input_panel_event_callback_add(imf_context,
-                                       ECORE_IMF_INPUT_PANEL_STATE_EVENT,
-                                       __input_panel_event_cb, (void *)ad);
-               }
+               evas_object_size_hint_min_set(box, ELM_SCALE_SIZE(w), ELM_SCALE_SIZE(h));
+               evas_object_show(box);
 
-               elm_object_item_signal_emit(st->pw_item,
-                               "elm,state,rename,hide", "");
-               if (!elm_entry_is_empty(entry)) {
-                       elm_object_item_signal_emit(st->pw_item,
-                                       "elm,state,eraser,hide", "");
-               }
+               return box;
+       }
 
-               elm_object_part_text_set(entry, "elm.guide",
-                               S_("IDS_COM_BODY_ENTER_PASSWORD"));
+       __MOBILE_AP_FUNC_EXIT__;
+       return NULL;
+}
 
-               evas_object_show(entry);
-               st->pw_entry = entry;
+static char *_gl_pswd_check_box_text_get(void *data,
+               Evas_Object *obj, const char *part)
+{
+       if (!strcmp("elm.text", part))
+               return strdup(STR_SHOW_PASSWORD);
 
-               __MOBILE_AP_FUNC_EXIT__;
-               return st->pw_entry;
-       } else if (g_strcmp0(part, "elm.icon.eraser") == 0) {
-               Evas_Object *btn = elm_button_add(obj);
-               elm_object_style_set(btn, "editfield_clear");
-               evas_object_smart_callback_add(btn, "clicked", __pw_layout_eraser_clicked_cb, data);
-               return btn;
-       } else {
-               DBG("Unknown part : %s\n", part);
+       return NULL;
+
+}
+
+static Evas_Object *_gl_pswd_check_box_content_get(void *data,
+               Evas_Object *obj, const char *part)
+{
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       Evas_Object *check = NULL;
+
+       if (data == NULL || obj == NULL || part == NULL) {
+               ERR("Invalid param\n");
+               return NULL;
        }
 
+       if (!strcmp("elm.swallow.icon", part)) {
+               check = elm_check_add(obj);
+               evas_object_propagate_events_set(check, EINA_FALSE);
+
+               evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
+               evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_smart_callback_add(check, "changed", __check_box_changed_cb, (void *)ad);
+
+               elm_object_focus_allow_set(check, EINA_FALSE);
+
+               return check;
+       }
        return NULL;
 }
 
+
 static void __gl_hide_item_sel(void *data, Evas_Object *obj, void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
@@ -610,9 +654,9 @@ static void __gl_hide_item_sel(void *data, Evas_Object *obj, void *event_info)
        mh_appdata_t *ad = (mh_appdata_t *)data;
 
        elm_genlist_item_selected_set((Elm_Object_Item*)event_info, EINA_FALSE);
+       __hide_btn_changed_cb(ad, obj, NULL);
 
-       __hide_btn_changed_cb(data, obj, NULL);
-       elm_check_state_set(ad->setup.hide_btn, ad->setup.visibility ?
+       elm_check_state_set(ad->setup.hide_btn, ad->setup.visibility_new ?
                        EINA_FALSE : EINA_TRUE);
 
        __MOBILE_AP_FUNC_EXIT__;
@@ -630,73 +674,76 @@ static void __gl_security_item_sel(void *data, Evas_Object *obj, void *event_inf
        mh_appdata_t *ad = (mh_appdata_t *)data;
 
        elm_genlist_item_selected_set((Elm_Object_Item*)event_info, EINA_FALSE);
-
        __security_btn_changed_cb(data, obj, NULL);
-       elm_check_state_set(ad->setup.security_btn, ad->setup.security_type ==
+       elm_check_state_set(ad->setup.security_btn, ad->setup.security_type_new ==
                        TETHERING_WIFI_SECURITY_TYPE_NONE ? EINA_FALSE : EINA_TRUE);
 
        __MOBILE_AP_FUNC_EXIT__;
 }
 
-static void __free_genlist_itc(mh_appdata_t *ad)
-{
-       __MOBILE_AP_FUNC_ENTER__;
-
-       elm_genlist_item_class_free(ad->setup.sp_itc);
-       elm_genlist_item_class_free(ad->setup.hide_itc);
-       elm_genlist_item_class_free(ad->setup.security_itc);
-       elm_genlist_item_class_free(ad->setup.pw_itc);
-       elm_genlist_item_class_free(ad->setup.name_itc);
-
-       __MOBILE_AP_FUNC_EXIT__;
-       return;
-}
-
 static void __set_genlist_itc(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
 
-       ad->setup.sp_itc = elm_genlist_item_class_new();
-       ad->setup.sp_itc->item_style = "dialogue/separator";
-       ad->setup.sp_itc->func.text_get = NULL;
-       ad->setup.sp_itc->func.content_get = NULL;
-       ad->setup.sp_itc->func.state_get = NULL;
-       ad->setup.sp_itc->func.del = NULL;
+       ad->setup.name_itc = elm_genlist_item_class_new();
+       if (ad->setup.name_itc == NULL) {
+               ERR("elm_genlist_item_class_new failed\n");
+               __MOBILE_AP_FUNC_EXIT__;
+               return;
+       }
+       ad->setup.name_itc->item_style = MH_GENLIST_MULTILINE_TEXT_STYLE;
+       ad->setup.name_itc->func.text_get = __gl_device_name_title_label_get;
+       ad->setup.name_itc->func.content_get = NULL;
+       ad->setup.name_itc->func.state_get = NULL;
+       ad->setup.name_itc->func.del = NULL;
 
        ad->setup.hide_itc = elm_genlist_item_class_new();
-       ad->setup.hide_itc->item_style = "dialogue/1text.1icon";
+       if (ad->setup.hide_itc == NULL) {
+               ERR("elm_genlist_item_class_new failed\n");
+               __MOBILE_AP_FUNC_EXIT__;
+               return;
+       }
+       ad->setup.hide_itc->item_style = MH_GENLIST_1LINE_TEXT_ICON_STYLE;
        ad->setup.hide_itc->func.text_get = __gl_hide_label_get;
        ad->setup.hide_itc->func.content_get = __gl_hide_icon_get;
        ad->setup.hide_itc->func.state_get = NULL;
        ad->setup.hide_itc->func.del = NULL;
 
        ad->setup.security_itc = elm_genlist_item_class_new();
-       ad->setup.security_itc->item_style = "dialogue/1text.1icon";
+       if (ad->setup.security_itc == NULL) {
+               ERR("elm_genlist_item_class_new failed\n");
+               __MOBILE_AP_FUNC_EXIT__;
+               return;
+       }
+       ad->setup.security_itc->item_style = MH_GENLIST_1LINE_TEXT_ICON_STYLE;
        ad->setup.security_itc->func.text_get = __gl_security_label_get;
        ad->setup.security_itc->func.content_get = __gl_security_icon_get;
        ad->setup.security_itc->func.state_get = NULL;
        ad->setup.security_itc->func.del = NULL;
 
        ad->setup.pw_itc = elm_genlist_item_class_new();
-       ad->setup.pw_itc->item_style = "dialogue/editfield/title";
-       ad->setup.pw_itc->func.text_get = __gl_pw_text_get;
-       ad->setup.pw_itc->func.content_get = __gl_pw_icon_get;
+       if (ad->setup.pw_itc == NULL) {
+               ERR("elm_genlist_item_class_new failed\n");
+               __MOBILE_AP_FUNC_EXIT__;
+               return;
+       }
+       ad->setup.pw_itc->item_style = MH_GENLIST_FULL_CONTENT_STYLE;
+       ad->setup.pw_itc->func.text_get = NULL;
+       ad->setup.pw_itc->func.content_get = __gl_pw_content_get;
        ad->setup.pw_itc->func.state_get = NULL;
        ad->setup.pw_itc->func.del = NULL;
 
-       ad->setup.name_itc = elm_genlist_item_class_new();
-       ad->setup.name_itc->item_style = "multiline/1text";
-       ad->setup.name_itc->func.text_get = __gl_name_label_get;
-       ad->setup.name_itc->func.content_get = NULL;
-       ad->setup.name_itc->func.state_get = NULL;
-       ad->setup.name_itc->func.del = NULL;
-
-       ad->setup.end_sp_itc = elm_genlist_item_class_new();
-       ad->setup.end_sp_itc->item_style = "dialogue/separator";
-       ad->setup.end_sp_itc->func.text_get = NULL;
-       ad->setup.end_sp_itc->func.content_get = NULL;
-       ad->setup.end_sp_itc->func.state_get = NULL;
-       ad->setup.end_sp_itc->func.del = NULL;
+       ad->setup.check_box_itc = elm_genlist_item_class_new();
+       if (ad->setup.check_box_itc == NULL) {
+               ERR("elm_genlist_item_class_new failed\n");
+               __MOBILE_AP_FUNC_EXIT__;
+               return;
+       }
+       ad->setup.check_box_itc->item_style = MH_GENLIST_1LINE_TEXT_ICON_STYLE;
+       ad->setup.check_box_itc->func.text_get = _gl_pswd_check_box_text_get;
+       ad->setup.check_box_itc->func.content_get = _gl_pswd_check_box_content_get;
+       ad->setup.check_box_itc->func.state_get = NULL;
+       ad->setup.check_box_itc->func.del = NULL;
 
        __MOBILE_AP_FUNC_EXIT__;
        return;
@@ -711,105 +758,189 @@ static void __deconstruct_wifi_setup_view(mh_wifi_setting_view_t *st)
                return;
        }
 
-       if (st->pw_entry == NULL) {
-               ERR("pw_entry is NULL");
-               return;
-       }
-
        evas_object_smart_callback_del(st->hide_btn, "changed",
                        __hide_btn_changed_cb);
        evas_object_smart_callback_del(st->security_btn, "changed",
                        __security_btn_changed_cb);
-       if (st->pw_entry) {
-               evas_object_smart_callback_del(st->pw_entry,
-                               "maxlength,reached",
-                               __passphrase_maxlength_reached_cb);
-               evas_object_smart_callback_del(st->pw_entry,
-                               "activated",
-                               __passphrase_activated_cb);
-       }
-       evas_object_smart_callback_del(st->back_btn, "clicked",
-                       __back_btn_cb);
+       evas_object_smart_callback_del(st->cancel_button, "clicked",
+                       __cancel_btn_cb);
+       evas_object_smart_callback_del(st->save_button, "clicked",
+                       __save_btn_cb);
        evas_object_smart_callback_del(st->genlist, "realized",
                        __gl_realized);
 
-       st->hide_btn = NULL;
-       st->security_btn = NULL;
-       st->pw_entry = NULL;
-       st->back_btn = NULL;
-       st->genlist = NULL;
-
        __MOBILE_AP_FUNC_EXIT__;
 }
 
-static void __back_btn_cb(void *data, Evas_Object *obj, void *event_info)
+static void __settings_reloaded_cb(tethering_error_e result, void *user_data)
 {
-       __MOBILE_AP_FUNC_ENTER__;
-
-       if (data == NULL) {
-               ERR("The param is NULL\n");
+       if (user_data == NULL) {
+               ERR("Invalid parameter\n");
                return;
        }
 
+       __MOBILE_AP_FUNC_ENTER__;
+
+       g_source_remove(tethering_param_timer);
+
+       mh_appdata_t *ad = (mh_appdata_t *)user_data;
+
+       if (result != TETHERING_ERROR_NONE)
+               ERR("tethering_wifi_reload_settings is failed [0x%X]\n", result);
+       _update_wifi_item(ad, MH_STATE_NONE);
+
+       __MOBILE_AP_FUNC_EXIT__;
+
+       return;
+}
+
+static gboolean _update_tethering_param(gpointer data)
+{
+       __MOBILE_AP_FUNC_ENTER__;
        mh_appdata_t *ad = (mh_appdata_t *)data;
-       mh_wifi_setting_view_t *st = &ad->setup;
-       Eina_Bool imf_state;
        int ret;
-       char *ptr = NULL;
 
-       imf_state = ecore_imf_input_panel_hide();
-       elm_object_focus_set(st->pw_entry, EINA_FALSE);
+       if (ad == NULL) {
+               ERR("Invalid parameter\n");
+               return FALSE;
+       }
 
-       if (strlen(st->wifi_passphrase_new) < WIFI_PASSPHRASE_LENGTH_MIN) {
-               DBG("Password is shorter than %d\n", WIFI_PASSPHRASE_LENGTH_MIN);
-               ret = notification_status_message_post(_("IDS_ST_BODY_ENTER_PASSWORD_OF_AT_LEAST_8_CHARACTERS"));
-               if (ret != NOTIFICATION_ERROR_NONE)
-                       ERR("notification_status_message_post() is failed : %d\n", ret);
+       /* reload wifi settings */
+       ret = tethering_wifi_reload_settings(ad->handle, __settings_reloaded_cb,
+                       (void *)ad);
+       if (ret != TETHERING_ERROR_NONE)
+               ERR("reload_configuration is failed : %d\n", ret);
 
-               ptr = elm_entry_utf8_to_markup(st->wifi_passphrase);
-               if (ptr != NULL) {
-                       elm_entry_entry_set(st->pw_entry, ptr);
-                       free(ptr);
-               } else {
-                       ERR("elm_entry_utf8_to_markup is failed\n");
-               }
+       __MOBILE_AP_FUNC_EXIT__;
+       return FALSE;
+}
 
+static void __save_btn_cb(void *data, Evas_Object *object, void *event_info)
+{
+       DBG("+\n");
+       if (data == NULL) {
+               ERR("data is NULL\n");
                return;
        }
 
-       if (g_strcmp0(st->wifi_passphrase, st->wifi_passphrase_new) != 0) {
-               if (__save_wifi_passphrase(ad) == EINA_FALSE) {
-                       ERR("__save_wifi_passphrase is failed\n");
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       mh_wifi_setting_view_t *st = &ad->setup;
+       bool ret = false;
+       bool is_setting_changed = false;
+
+       /* handle hide button change */
+       if (st->visibility != st->visibility_new) {
+               ret = __save_hide_btn_change(ad);
+               if (ret == false) {
+                       elm_check_state_set(st->hide_btn, st->visibility ?
+                                       EINA_FALSE : EINA_TRUE);
+               } else {
+                       st->visibility = st->visibility_new;
+                       is_setting_changed = true;
+               }
+       }
+       /* handle security button change */
+       if (st->security_type != st->security_type_new) {
+               ret = __save_security_btn_change(ad);
+               if (ret == false) {
+                       elm_check_state_set(st->security_btn, st->security_type ==
+                                       TETHERING_WIFI_SECURITY_TYPE_NONE ? EINA_FALSE : EINA_TRUE);
+               } else {
+                               st->security_type = st->security_type_new;
+                               is_setting_changed = true;
                }
        }
 
-       if (imf_state == EINA_TRUE) {
-               DBG("IMF is hided\n");
-               return;
+       /* handle wifi passphrase change */
+       if (strcmp(st->wifi_passphrase, st->wifi_passphrase_new)) {
+               ret = __save_wifi_passphrase(ad);
+               if (ret == false) {
+                       g_strlcpy(st->wifi_passphrase_new, st->wifi_passphrase,
+                                       sizeof(st->wifi_passphrase_new));
+                       if (st->pw_item)
+                               elm_genlist_item_update(st->pw_item);
+               } else {
+                       g_strlcpy(st->wifi_passphrase, st->wifi_passphrase_new,
+                                       sizeof(st->wifi_passphrase));
+                       is_setting_changed = true;
+                       if (ad->main.help_item) {
+                               if (ad->main.help_item)
+                                       elm_genlist_item_update(ad->main.help_item);
+                       }
+               }
        }
 
-       if (ad->main.need_recover_wifi_tethering == true) {
-               DBG("Turn on Wi-Fi tethering again\n");
+       if (is_setting_changed) {
                _update_wifi_item(ad, MH_STATE_PROCESS);
+
                if (ad->main.help_item)
                        elm_genlist_item_update(ad->main.help_item);
 
-               ret = tethering_enable(ad->handle, TETHERING_TYPE_WIFI);
-               if (ret != TETHERING_ERROR_NONE) {
-                       ERR("Wi-Fi tethering on is failed : %d\n", ret);
-                       _update_wifi_item(ad, MH_STATE_NONE);
-                       ad->main.need_recover_wifi_tethering = false;
-               }
+               /* Here, The Dbus takes some amount of time
+                  to set the tethering parameters, due to
+                  which UI shows incorrect display, to avoid
+                  this issue, CAPI will be called after 0.1sec for smooth
+                  transition of UI frames */
+               tethering_param_timer = g_timeout_add(100,
+                                                 _update_tethering_param, ad);
        }
 
-       __deconstruct_wifi_setup_view(st);
+       elm_naviframe_item_pop(ad->naviframe);
+
+       DBG("-\n");
+       return;
+}
+
+static void __cancel_btn_cb(void *data, Evas_Object *object, void *event_info)
+{
+       DBG("+\n");
+
+       if (data == NULL) {
+               ERR("The param is NULL\n");
+               return;
+       }
 
-       evas_object_del(ad->setup.genlist);
-       __free_genlist_itc(ad);
+       mh_appdata_t *ad = (mh_appdata_t *)data;
 
        elm_naviframe_item_pop(ad->naviframe);
+       DBG("-\n");
+       return;
+}
 
-       __MOBILE_AP_FUNC_EXIT__;
+Eina_Bool _setting_back_btn_cb(void *data, Elm_Object_Item *navi_item)
+{
+       DBG("+\n");
+
+       if (data == NULL) {
+               ERR("The param is NULL\n");
+               return EINA_FALSE;
+       }
+
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       if (st->visibility != st->visibility_new)
+               st->visibility_new = st->visibility;
+
+       if (st->security_type != st->security_type_new)
+               st->security_type_new = st->security_type;
+
+       if (strcmp(st->wifi_passphrase_new, st->wifi_passphrase)) {
+               g_strlcpy(st->wifi_passphrase_new, st->wifi_passphrase,
+                                       sizeof(st->wifi_passphrase_new));
+       }
+       st->pw_entry = NULL;
+       __deconstruct_wifi_setup_view(st);
+
+       if (ad->rename_popup != NULL) {
+               evas_object_del(ad->rename_popup);
+               ad->rename_popup = NULL;
+       }
+       ad->setup.navi_it = NULL;
+       _ctxpopup_more_button_callback_add(ad);
+
+       DBG("-\n");
+       return EINA_TRUE;
 }
 
 static void __gl_realized(void *data, Evas_Object *obj, void *event_info)
@@ -822,22 +953,18 @@ static void __gl_realized(void *data, Evas_Object *obj, void *event_info)
        Evas_Object *ao;
        Evas_Object *btn;
        char str[MH_LABEL_LENGTH_MAX] = {0, };
-       int i = 0;
+       int no_of_sp;
+       int i;
 
-       if (item == st->hide_item) {
-               DBG("Hide item is realized\n");
+       if (item == st->hide_item)
                elm_object_item_signal_emit(item, "elm,state,top", "");
-       } else if (item == st->security_item) {
-               DBG("Security item is realized\n");
+       else if (item == st->security_item)
                elm_object_item_signal_emit(item, "elm,state,center", "");
-       } else if (item == st->pw_item) {
-               DBG("Password item is realized\n");
+       else if (item == st->pw_item)
                elm_object_item_signal_emit(item, "elm,state,bottom", "");
-       } else if (item == st->name_item) {
-               DBG("Name item is realized\n");
-       }
 
-       for (i = 0; i < 2; i++) {
+       no_of_sp = sizeof(st->sp_item) / sizeof(st->sp_item[0]);
+       for (i = 0; i < no_of_sp; i++) {
                if (item == st->sp_item[i])
                        elm_object_item_access_unregister(item);
        }
@@ -850,11 +977,63 @@ static void __gl_realized(void *data, Evas_Object *obj, void *event_info)
                elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, str);
        }
 
+       if (item == st->pw_item) {
+               elm_object_item_access_unregister(item);
+               ao = elm_object_item_access_register(item);
+               snprintf(str, sizeof(str), "%s, %s", STR_PASSWORD, st->wifi_passphrase_new);
+               elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, str);
+       }
+
        __MOBILE_AP_FUNC_EXIT__;
 
        return;
 }
 
+static void __select_passphrase_item(void *data, Evas_Object *obj, void *event_info)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+
+       if (data == NULL) {
+               ERR("The param is NULL\n");
+               return;
+       }
+
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       elm_object_focus_set(st->pw_entry, EINA_TRUE);
+
+       __MOBILE_AP_FUNC_EXIT__;
+       return;
+}
+
+static void __create_password_item(Evas_Object *genlist, mh_appdata_t *ad)
+{
+       void *data = (void *)ad;
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       st->pw_item = elm_genlist_item_append(genlist, st->pw_itc, data, NULL,
+                       ELM_GENLIST_ITEM_NONE, __select_passphrase_item, ad);
+       if (st->security_type == TETHERING_WIFI_SECURITY_TYPE_NONE)
+               elm_object_item_disabled_set(st->pw_item, EINA_TRUE);
+       else
+               elm_object_item_disabled_set(st->pw_item, EINA_FALSE);
+
+       st->check_box_item = elm_genlist_item_append(genlist, st->check_box_itc, data, NULL,
+                       ELM_GENLIST_ITEM_NONE, NULL, NULL);
+}
+
+static void __destroy_password_item(mh_appdata_t *ad)
+{
+       mh_wifi_setting_view_t *st = &ad->setup;
+
+       elm_object_item_del(st->check_box_item);
+       st->check_box_item = NULL;
+
+       elm_object_item_del(st->pw_item);
+       st->pw_item = NULL;
+}
+
 Evas_Object *__create_genlist(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
@@ -867,8 +1046,6 @@ Evas_Object *__create_genlist(mh_appdata_t *ad)
        void *data = (void *)ad;
        mh_wifi_setting_view_t *st = &ad->setup;
        Evas_Object *genlist;
-       Elm_Object_Item *item;
-       int i = 0;
 
        genlist = elm_genlist_add(ad->naviframe);
        if (genlist == NULL) {
@@ -881,10 +1058,13 @@ Evas_Object *__create_genlist(mh_appdata_t *ad)
        evas_object_smart_callback_add(genlist, "realized", __gl_realized, ad);
 
        __set_genlist_itc(ad);
-       item = elm_genlist_item_append(genlist, st->sp_itc, NULL, NULL,
+
+       st->name_item = elm_genlist_item_append(genlist, st->name_itc, data, NULL,
                        ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-       st->sp_item[i++] = item;
+       elm_genlist_item_select_mode_set(st->name_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       if (st->name_item)
+               elm_object_item_disabled_set(st->name_item, EINA_TRUE);
 
        st->hide_item = elm_genlist_item_append(genlist, st->hide_itc, data, NULL,
                        ELM_GENLIST_ITEM_NONE, __gl_hide_item_sel, data);
@@ -892,129 +1072,55 @@ Evas_Object *__create_genlist(mh_appdata_t *ad)
        st->security_item = elm_genlist_item_append(genlist, st->security_itc, data, NULL,
                        ELM_GENLIST_ITEM_NONE, __gl_security_item_sel, data);
 
-       st->pw_item = elm_genlist_item_append(genlist, st->pw_itc, data, NULL,
-                       ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       elm_genlist_item_select_mode_set(st->pw_item, ELM_OBJECT_SELECT_MODE_NONE);
-
-       st->name_item = elm_genlist_item_append(genlist, st->name_itc, data, NULL,
-                       ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       elm_genlist_item_select_mode_set(st->name_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
-       item = elm_genlist_item_append(genlist, st->end_sp_itc, NULL, NULL,
-                       ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-       st->sp_item[i++] = item;
-
+       if (st->security_type != TETHERING_WIFI_SECURITY_TYPE_NONE)
+               __create_password_item(genlist, ad);
 
        __MOBILE_AP_FUNC_EXIT__;
 
        return genlist;
 }
 
-char *__slide_title_access_info_cb(void *data, Evas_Object *obj)
-{
-       Evas_Object *label;
-       Elm_Object_Item *navi_it;
-       Eina_Strbuf *buf;
-       const char *info;
-       char *ret;
-
-       navi_it = (Elm_Object_Item *) data;
-       label = elm_object_item_part_content_get(navi_it, "elm.swallow.title");
-       if (label == NULL)
-               return NULL;
-
-       info = elm_object_text_get(label);
-       if (info == NULL)
-               return NULL;
-
-       buf = eina_strbuf_new();
-       eina_strbuf_append(buf, info);
-
-       ret = eina_strbuf_string_steal(buf);
-       eina_strbuf_free(buf);
-       return ret;
-}
-
-static void __title_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       Evas_Object *label;
-       Elm_Object_Item *navi_it = event_info;
-       if (navi_it == NULL)
-               return;
-
-       label = elm_object_item_part_content_get(navi_it, "elm.swallow.title");
-       if (label == NULL)
-               return;
-
-       elm_label_slide_go(label);
-}
-
 void mh_draw_wifi_setup_view(mh_appdata_t *ad)
 {
-       __MOBILE_AP_FUNC_ENTER__;
+       DBG("+\n");
 
        if (ad == NULL) {
                ERR("ad is NULL\n");
+               DBG("-\n");
                return;
        }
-
+       Evas_Object *btn;
        mh_wifi_setting_view_t *st = &ad->setup;
-       Evas_Object *ao;
-       Evas_Object *label;
-
 
-       if (st->genlist != NULL) {
+       if (ad->setup.navi_it != NULL) {
                ERR("Wi-Fi setup view already exists\n");
+               DBG("-\n");
                return;
        }
 
        st->genlist = __create_genlist(ad);
        if (st->genlist == NULL) {
                ERR("__create_genlist returns NULL\n");
-               goto FAIL;
-       }
-
-       st->back_btn = elm_button_add(ad->naviframe);
-       if (st->back_btn == NULL) {
-               ERR("elm_button_add returns NULL\n");
-               goto FAIL;
-       }
-       elm_object_style_set(st->back_btn, "naviframe/back_btn/default");
-       evas_object_smart_callback_add(st->back_btn, "clicked",
-                       __back_btn_cb, ad);
-       elm_object_focus_allow_set(st->back_btn, EINA_FALSE);
-
-       st->navi_it = elm_naviframe_item_push(ad->naviframe,
-                       NULL,
-                       st->back_btn, NULL, st->genlist, NULL);
-
-       /* Slide title */
-       label = _create_slide_title(ad->naviframe, _("IDS_MOBILEAP_MBODY_WI_FI_TETHERING_SETTINGS"));
-       elm_object_item_part_content_set(st->navi_it, "elm.swallow.title", label);
-       evas_object_smart_callback_add(ad->naviframe, "title,clicked", __title_clicked_cb, NULL);
-
-       ao = elm_object_item_access_object_get(st->navi_it);
-       if (ao) {
-               elm_access_info_set(ao, ELM_ACCESS_TYPE, "title");
-               elm_access_info_cb_set(ao, ELM_ACCESS_INFO,
-                               __slide_title_access_info_cb, st->navi_it);
-               elm_object_focus_set(ao, EINA_TRUE);
+               DBG("-\n");
+               return;
        }
 
-       /* Realize genlist item forcely since UIFW doesn't make realize to avoid crash on landscape mode*/
-       elm_genlist_item_update(st->pw_item);
+       st->navi_it = elm_naviframe_item_push(ad->naviframe, "IDS_MOBILEAP_BODY_CONFIGURE_MOBILE_HOTSPOT_ABB_US_TMO",
+                       NULL, NULL, st->genlist, NULL);
+       elm_object_item_domain_text_translatable_set(st->navi_it, PKGNAME, EINA_TRUE);
 
-       __MOBILE_AP_FUNC_EXIT__;
-
-       return;
+       elm_naviframe_item_pop_cb_set(st->navi_it, _setting_back_btn_cb, (void *)ad);
 
-FAIL:
-       if (st->back_btn)
-               evas_object_del(st->back_btn);
-       if (st->genlist)
-               evas_object_del(st->genlist);
+       btn = elm_button_add(ad->naviframe);
+       elm_object_style_set(btn, "naviframe/title_cancel");
+       evas_object_smart_callback_add(btn, "clicked", __cancel_btn_cb, ad);
+       elm_object_item_part_content_set(st->navi_it, "title_left_btn", btn);
+       st->cancel_button = btn;
 
-       st->back_btn = NULL;
-       st->genlist = NULL;
+       btn = elm_button_add(ad->naviframe);
+       elm_object_style_set(btn, "naviframe/title_done");
+       evas_object_smart_callback_add(btn, "clicked", __save_btn_cb, ad);
+       elm_object_item_part_content_set(st->navi_it, "title_right_btn", btn);
+       st->save_button = btn;
+       DBG("-\n");
 }