summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-05-13 09:16:33 -0700
committerRoshan Pius <rpius@google.com>2019-05-13 10:08:48 -0700
commit81468eeebdf860cce461ed595725598bc608cadb (patch)
tree73def112f11477ae6e89f130502784d9e841424a /service
parentcf347721b74cbb08777e80ab719cf06b415a700e (diff)
WifiNetworkFactory: Handle request for connection to current network
Always trigger a disconnect before issuing the connect request for a user approved network. This will ensure that we can start with a clean slate for any connection requests from app (after user approves the request). Bug: 132298510 Test: Repro'ed the reported multinetwork CtsVerifier test failure & verified that this CL passes the test. Test: Manually verified the wifi network request CtsVerifier tests. Test: atest com.android.server.wifi.ClientModeImplTest Test: Existing ACTS test - WifiNetworkRequestTest Change-Id: I718238a1ee790bd416222161c87c90c348ea59a1
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkFactory.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkFactory.java b/service/java/com/android/server/wifi/WifiNetworkFactory.java
index 168200bd5..65d78e6aa 100644
--- a/service/java/com/android/server/wifi/WifiNetworkFactory.java
+++ b/service/java/com/android/server/wifi/WifiNetworkFactory.java
@@ -749,6 +749,8 @@ public class WifiNetworkFactory extends NetworkFactory {
// Store the user selected network.
mUserSelectedNetwork = networkToConnect;
+ // Disconnect from the current network before issuing a new connect request.
+ mWifiInjector.getClientModeImpl().disconnectCommand();
// Trigger connection to the network.
connectToNetwork(networkToConnect);
// Triggered connection to network, now wait for the connection status.