diff options
author | Ningyuan Wang <nywang@google.com> | 2017-05-08 13:34:52 -0700 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2017-05-31 15:10:45 -0700 |
commit | ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426 (patch) | |
tree | b6d817978fc9b26301b61ac13504b8dbdf29ba4e /tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java | |
parent | 06917c95b568c01e30edab40a1149bf8e2ae1962 (diff) | |
download | android_frameworks_opt_net_wifi-ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426.tar.gz android_frameworks_opt_net_wifi-ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426.tar.bz2 android_frameworks_opt_net_wifi-ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426.zip |
Do not remove and add the same network
This patch allows SupplicantStatIfaceHal to skip the "remove
and add" process for supplicant network if there is already
the same network saved in supplicant.
This will be helpful when phone reconnects to a EAP-SIM
network. In that case, EAP state parameters will not be cleared by
removing network, so supplicant can take advantage of those
parameters for fast-reauth.
Bug: 37529849
Test: compile. unit test, integration test, manual test
Change-Id: I4326e9f60f4f8a64674a52d1dbbcd34c5e709064
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java index 917a64cc9..b53732a91 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java @@ -241,6 +241,15 @@ public class WifiConfigurationTestUtil { return configuration; } + public static WifiConfiguration createPskNetwork(String ssid) { + WifiConfiguration configuration = + generateWifiConfig(TEST_NETWORK_ID, TEST_UID, ssid, true, true, null, + null, SECURITY_PSK); + configuration.preSharedKey = TEST_PSK; + return configuration; + } + + public static WifiConfiguration createPskHiddenNetwork() { WifiConfiguration configuration = createPskNetwork(); configuration.hiddenSSID = true; @@ -280,6 +289,14 @@ public class WifiConfigurationTestUtil { return configuration; } + public static WifiConfiguration createEapNetwork(String ssid) { + WifiConfiguration configuration = + generateWifiConfig(TEST_NETWORK_ID, TEST_UID, ssid, true, true, + null, null, SECURITY_EAP); + return configuration; + } + + public static WifiConfiguration createEapNetwork(int eapMethod, int phase2Method) { WifiConfiguration configuration = generateWifiConfig(TEST_NETWORK_ID, TEST_UID, createNewSSID(), true, true, |