From: Milind Murhekar Date: Thu, 10 Nov 2016 14:17:43 +0000 (+0530) Subject: [TSAM-9221] Fixed Issue for multiple network connected popup's X-Git-Tag: submit/tizen/20161114.043131~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d810c2003246c1b3afed1eb8d4b639600adcefe;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git [TSAM-9221] Fixed Issue for multiple network connected popup's Description: This patch fixes the issue related to multiple popups shown when ready signal is recieved by net-config. There is a timer set for 3sec to consume all the ready signals to avoid multiple popups in the display. Change-Id: I7bb336d8626ea83088930cb85058a8ba240cc465 Signed-off-by: Milind Murhekar --- diff --git a/packaging/net-config.spec b/packaging/net-config.spec index 16ecae3..e07cd5b 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.1.92 +Version: 1.1.93 Release: 2 Group: System/Network License: Apache-2.0 diff --git a/src/wifi-state.c b/src/wifi-state.c index fbafbd9..335d751 100755 --- a/src/wifi-state.c +++ b/src/wifi-state.c @@ -45,6 +45,8 @@ static wifi_tech_state_e g_tech_state = NETCONFIG_WIFI_TECH_UNKNOWN; static GSList *notifier_list = NULL; +static guint network_connected_popup_timer_id = 0; +static gboolean block_network_connected_popup = FALSE; static void __netconfig_pop_wifi_connected_poppup(const char *ssid) { @@ -66,6 +68,13 @@ static void __netconfig_pop_wifi_connected_poppup(const char *ssid) bundle_free(b); } +static gboolean _block_network_connection_popup(gpointer data) +{ + block_network_connected_popup = FALSE; + netconfig_stop_timer(&network_connected_popup_timer_id); + return FALSE; +} + static void __set_wifi_connected_essid(void) { const char *essid_name = NULL; @@ -87,7 +96,15 @@ static void __set_wifi_connected_essid(void) } netconfig_set_vconf_str(VCONFKEY_WIFI_CONNECTED_AP_NAME, essid_name); - __netconfig_pop_wifi_connected_poppup(essid_name); + + /* Block Network Connected popup for 3sec + * to avoid multiple popup's due to ready signals */ + if (block_network_connected_popup == FALSE) { + block_network_connected_popup = TRUE; + netconfig_start_timer(3000, _block_network_connection_popup, + NULL, &network_connected_popup_timer_id); + __netconfig_pop_wifi_connected_poppup(essid_name); + } } static void __unset_wifi_connected_essid(void)