[WiFi][Non-ACR][Check connection state before connecting AP] 02/218402/1
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 22 Nov 2019 03:54:15 +0000 (12:54 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 22 Nov 2019 03:54:18 +0000 (12:54 +0900)
wifi ap might be connected automatically after finishing scan.

Change-Id: Ice6f040e3c0803afb9372079c0afaaee174d228a

tct-suite-vs/Tizen.WiFi.Tests/testcase/support/networkSetup.cs

index 83edad3..374099a 100755 (executable)
@@ -123,6 +123,16 @@ namespace networkUtils
                 return;
             }
 
+            /**
+             * Auto-connection might occurs after scan.
+             * Check connection state before requesting connect to AP.
+             */
+            if (WiFiManager.ConnectionState == WiFiConnectionState.Connected)
+            {
+                Tizen.Log.Info(Globals.LogTag, "Already connected");
+                return;
+            }
+
             // Connect to AP
             Tizen.Log.Info(Globals.LogTag, "Set passphrase " + WiFiPass);
             ap.SecurityInformation.SetPassphrase(WiFiPass);