[ug-wifi-efl]: Fixed TSAM-8893 Issue :Wifi screen is blink in background 41/93141/4
authorManeesh Jain <maneesh.jain@samsung.com>
Thu, 20 Oct 2016 11:35:53 +0000 (17:05 +0530)
committerManeesh Jain <maneesh.jain@samsung.com>
Thu, 20 Oct 2016 11:58:03 +0000 (17:28 +0530)
Description:This patch is used to fixed TSAM-8893 issue.
Reason: During WPS connection, application keep getting the Scan Indication
event from M/W. Application viewer process this event by clear & update the
Scan list. Thats why there was a blink in background

To fix this issue, block the scan indication event while WPS
conneciton is in progress.

Change-Id: I273c9ac8c7e0d447fc866489df7dfc77937d367c
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
packaging/wifi-efl-ug.spec
sources/ui-gadget/include/ug_wifi.h
sources/ui-gadget/viewers-layout/viewer_manager.c
sources/ui-gadget/viewers-layout/wifi_viewer_list.c
sources/ui-gadget/wifi-wlan-callbacks.c

index c8bbe2f..14e79a8 100644 (file)
@@ -1,7 +1,7 @@
 %define _unpackaged_files_terminate_build 0
 Name:          wifi-efl-ug
 Summary:       Wi-Fi UI Gadget for TIZEN
-Version:       1.0.206
+Version:       1.0.207
 Release:       1
 Group:         App/Network
 License:       Flora-1.1
index 6ae0dea..37af95e 100755 (executable)
@@ -69,8 +69,9 @@ typedef struct {
 
        bool is_hidden;
        guint timeout;
-
        bool is_first_scan;
+       bool is_wifi_scan_indication_block;
+
 } wifi_appdata ;
 
 struct ug_data {
index 73684e7..85876dd 100755 (executable)
@@ -653,6 +653,7 @@ static void __power_onoff_cb(void *data, Evas_Object *obj, void *event_info)
        object_type = evas_object_type_get(obj);
 
        current_mode = viewer_manager_header_mode_get();
+       ug_app_state->is_wifi_scan_indication_block = 0;
 
        if (current_mode == HEADER_MODE_ACTIVATING ||
                        current_mode == HEADER_MODE_DEACTIVATING) {
@@ -1510,6 +1511,7 @@ void viewer_manager_header_mode_set(HEADER_MODES new_mode)
                        __viewer_manager_hidden_btn_del();
                        __viewer_manager_setup_wizard_scan_btn_del();
                }
+               ug_app_state->is_wifi_scan_indication_block = 0;
                break;
        case HEADER_MODE_ON:
        case HEADER_MODE_CONNECTED:
index f7b257c..24da120 100755 (executable)
@@ -444,6 +444,7 @@ static void __wps_pbc_popup_cancel_connecting(void *data, Evas_Object *obj,
        ug_app_state->passpopup = NULL;
 
        viewer_manager_header_mode_set(HEADER_MODE_ON);
+       ug_app_state->is_wifi_scan_indication_block = 0;
 
        __COMMON_FUNC_EXIT__;
 }
@@ -456,6 +457,7 @@ static void _wps_btn_cb(void* data, Evas_Object* obj, void* event_info)
                return;
        }
 
+       ug_app_state->is_wifi_scan_indication_block = 1;
        wifi_ap_h ap = passwd_popup_get_ap(ug_app_state->passpopup);
        int ret = wlan_manager_wps_connect(ap);
        if (ret == WLAN_MANAGER_ERR_NONE) {
@@ -466,6 +468,7 @@ static void _wps_btn_cb(void* data, Evas_Object* obj, void* event_info)
                ERROR_LOG(UG_NAME_NORMAL, "wlan_manager_wps_connect failed");
                passwd_popup_free(ug_app_state->passpopup);
                ug_app_state->passpopup = NULL;
+               ug_app_state->is_wifi_scan_indication_block = 0;
        }
 
        __COMMON_FUNC_EXIT__;
@@ -475,6 +478,8 @@ static void _wps_cancel_cb(void* data, Evas_Object* obj, void* event_info)
 {
        __COMMON_FUNC_ENTER__;
 
+       ug_app_state->is_wifi_scan_indication_block = 0;
+
        if (ug_app_state->passpopup == NULL) {
                return;
        }
@@ -498,6 +503,8 @@ static void _wps_pin_cb(void* data, Evas_Object* obj, void* event_info)
                return;
        }
 
+       ug_app_state->is_wifi_scan_indication_block = 1;
+
        /* Generate WPS pin */
        rpin = wps_generate_pin();
        if (rpin > 0)
@@ -529,6 +536,7 @@ static void _wps_pin_cb(void* data, Evas_Object* obj, void* event_info)
                ERROR_LOG(UG_NAME_NORMAL, "wlan_manager_wps_pin_connect failed");
                passwd_popup_free(ug_app_state->passpopup);
                ug_app_state->passpopup = NULL;
+               ug_app_state->is_wifi_scan_indication_block = 0;
        }
 
        __COMMON_FUNC_EXIT__;
index defc6b0..98991b8 100755 (executable)
@@ -148,10 +148,16 @@ void wlan_engine_callback(wlan_mgr_event_info_t *event_info, void *user_data)
                                        ug_state);
                }
 #else
-               wlan_manager_scanned_profile_refresh();
+               if (ug_app_state->is_wifi_scan_indication_block != 1) {
+                       wlan_manager_scanned_profile_refresh();
+                       viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               }
+               else
+                       INFO_LOG(UG_NAME_NORMAL, "Block the SCAN indication");
+
+
 #endif
 
-               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
 
                break;