From 8a93209d2ab6b1a17b35f181aca99a0aa3af1936 Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Fri, 4 Oct 2013 14:41:18 -0700 Subject: [PATCH] Fixes TIVI-1943 There is a small delay that the connman scan api is usable after WiFi is turned on, which results in SettingsApp showing net.connman.Error.NoCarrier message. Adding a small 1 sec delay to do the initial scan after wifi is turned on to eliminate this issue. Change-Id: I4fd4e64382dbf45c0e84fd44b616fc5a9bfebcf2 Signed-off-by: Jimmy Huang --- js/panel-wifi.js | 12 ++++++++++-- packaging/Settings.changes | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/js/panel-wifi.js b/js/panel-wifi.js index 1494da0..cfea3ad 100644 --- a/js/panel-wifi.js +++ b/js/panel-wifi.js @@ -30,8 +30,12 @@ function wifiPanelInit() { adapter.getPowered(function(is_powered) { if (is_powered) { + wifiClearKnownList(); + wifiClearAvailableList(); wifiToggleOn(); - wifiScan(adapter); + setTimeout(function() { + wifiScan(adapter); + }, 1000); } else { wifiToggleOff(); } @@ -64,8 +68,12 @@ function wifiPanelInit() { adapter.setPowered(true, function() { /* success */ console.log('Successfully enable WiFi subsystem'); + wifiClearKnownList(); + wifiClearAvailableList(); wifiToggleOn(); - wifiScan(adapter); + setTimeout(function() { + wifiScan(adapter); + }, 1000); }, function(e) { /* error */ wifiToggleOff(); diff --git a/packaging/Settings.changes b/packaging/Settings.changes index b13db1b..3357880 100644 --- a/packaging/Settings.changes +++ b/packaging/Settings.changes @@ -1,3 +1,6 @@ +* Fri Oct 04 2013 Jimmy Huang submit/tizen/20131003.210102@6d2592a +- Fixes TIVI-1943 + * Thu Oct 03 2013 Jimmy Huang accepted/tizen/20130918.214652@278671f - New release of SettingsApp - Bumped version to 0.0.2 -- 2.7.4