From 0328329e68144a3e6d244e76c393bf8706a99ec6 Mon Sep 17 00:00:00 2001 From: Maneesh Jain Date: Thu, 20 Oct 2016 17:05:53 +0530 Subject: [PATCH] [ug-wifi-efl]: Fixed TSAM-8893 Issue :Wifi screen is blink in background 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 --- packaging/wifi-efl-ug.spec | 2 +- sources/ui-gadget/include/ug_wifi.h | 3 ++- sources/ui-gadget/viewers-layout/viewer_manager.c | 2 ++ sources/ui-gadget/viewers-layout/wifi_viewer_list.c | 8 ++++++++ sources/ui-gadget/wifi-wlan-callbacks.c | 10 ++++++++-- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index c8bbe2f..14e79a8 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -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 diff --git a/sources/ui-gadget/include/ug_wifi.h b/sources/ui-gadget/include/ug_wifi.h index 6ae0dea..37af95e 100755 --- a/sources/ui-gadget/include/ug_wifi.h +++ b/sources/ui-gadget/include/ug_wifi.h @@ -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 { diff --git a/sources/ui-gadget/viewers-layout/viewer_manager.c b/sources/ui-gadget/viewers-layout/viewer_manager.c index 73684e7..85876dd 100755 --- a/sources/ui-gadget/viewers-layout/viewer_manager.c +++ b/sources/ui-gadget/viewers-layout/viewer_manager.c @@ -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: diff --git a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c index f7b257c..24da120 100755 --- a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c +++ b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c @@ -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__; diff --git a/sources/ui-gadget/wifi-wlan-callbacks.c b/sources/ui-gadget/wifi-wlan-callbacks.c index defc6b0..98991b8 100755 --- a/sources/ui-gadget/wifi-wlan-callbacks.c +++ b/sources/ui-gadget/wifi-wlan-callbacks.c @@ -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; -- 2.7.4