[TSAM-9582] Fixed display issue when settings changed 97/97997/1 accepted/tizen/common/20161116.134433 accepted/tizen/ivi/20161117.010111 accepted/tizen/mobile/20161117.005955 accepted/tizen/tv/20161117.010013 submit/tizen/20161116.043314 submit/tizen_3.0/20161216.010137
authorMilind Murhekar <m.murhekar@samsung.com>
Tue, 15 Nov 2016 14:04:24 +0000 (19:34 +0530)
committerMilind Murhekar <m.murhekar@samsung.com>
Tue, 15 Nov 2016 14:04:24 +0000 (19:34 +0530)
Description: This patch fixes the display shown after tethering
parameters is changed, due to which navigation is smoothly
transitioned.

The CAPI uses Dbus call to set the tethering parameters and takes some
time, due to which navigation frames gets stuck in between showing
incorrect and weird display.

Change-Id: I4b0343977800cc8a086ef66038771dabcc7bde48
Signed-off-by: Milind Murhekar <m.murhekar@samsung.com>
packaging/ug-setting-mobileap-efl.spec
src/mh_view_wifi_setup.c

index 3acae12..935ae4f 100755 (executable)
@@ -3,7 +3,7 @@
 
 Name:          ug-setting-mobileap-efl
 Summary:       Tethering UI Gadget Library
-Version:       1.0.150
+Version:       1.0.151
 Release:       1
 Group:         App/Network
 License:       Flora-1.1
index 0be374c..c567b56 100755 (executable)
@@ -26,6 +26,8 @@ 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 guint tethering_param_timer = 0;
+
 static void __hide_btn_changed_cb(void *data, Evas_Object *obj, void *event_info)
 {
        __MOBILE_AP_FUNC_ENTER__;
@@ -699,6 +701,8 @@ static void __settings_reloaded_cb(tethering_error_e result, void *user_data)
 
        __MOBILE_AP_FUNC_ENTER__;
 
+       g_source_remove(tethering_param_timer);
+
        mh_appdata_t *ad = (mh_appdata_t *)user_data;
 
        if (result != TETHERING_ERROR_NONE)
@@ -710,6 +714,27 @@ static void __settings_reloaded_cb(tethering_error_e result, void *user_data)
        return;
 }
 
+static gboolean _update_tethering_param(gpointer data)
+{
+       __MOBILE_AP_FUNC_ENTER__;
+       mh_appdata_t *ad = (mh_appdata_t *)data;
+       int ret;
+
+       if (ad == NULL) {
+               ERR("Invalid parameter\n");
+               return FALSE;
+       }
+
+       /* 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);
+
+       __MOBILE_AP_FUNC_EXIT__;
+       return FALSE;
+}
+
 static void __save_btn_cb(void *data, Evas_Object *object, void *event_info)
 {
        DBG("+\n");
@@ -771,11 +796,13 @@ static void __save_btn_cb(void *data, Evas_Object *object, void *event_info)
                if (ad->main.help_item)
                        elm_genlist_item_update(ad->main.help_item);
 
-               /* 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);
+               /* 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);
        }
 
        elm_naviframe_item_pop(ad->naviframe);