diff options
author | Peter Qiu <zqiu@google.com> | 2017-07-27 14:41:36 -0700 |
---|---|---|
committer | Peter Qiu <zqiu@google.com> | 2017-08-10 21:14:07 +0000 |
commit | e97e21f1f14e4ef16dd5d675b17615aef3a80301 (patch) | |
tree | c0d81456794fed76a698ddc9d6ed7f5909a779f9 /service | |
parent | 5a19b6b8f6b4a123371c6a2023a96e9d4f8d6aac (diff) |
Re-add network to supplicant when EAP identities changes
Update WifiConfigurationUtil#isSameNetwork to check changes in
both EAP identity and anonymous identity. So that the network
parameters in wpa_supplicant will get reloaded when the EAP
identities changed.
Bug: 63979263
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Verify connection to a EAP-SIM network will fail after SIM card
is replaced
Change-Id: I592018de52c2515dbd64aea0138b5bc88b70fec7
(cherry picked from commit 8e08c5d97b1608e1b173867998dd82e6f44d1d13)
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigurationUtil.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigurationUtil.java b/service/java/com/android/server/wifi/WifiConfigurationUtil.java index f706c4e1f..fef78aade 100644 --- a/service/java/com/android/server/wifi/WifiConfigurationUtil.java +++ b/service/java/com/android/server/wifi/WifiConfigurationUtil.java @@ -23,6 +23,7 @@ import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiEnterpriseConfig; import android.net.wifi.WifiScanner; import android.os.UserHandle; +import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; @@ -192,6 +193,12 @@ public class WifiConfigurationUtil { != newEnterpriseConfig.getPhase2Method()) { return true; } + if (!TextUtils.equals(existingEnterpriseConfig.getIdentity(), + newEnterpriseConfig.getIdentity()) + || !TextUtils.equals(existingEnterpriseConfig.getAnonymousIdentity(), + newEnterpriseConfig.getAnonymousIdentity())) { + return true; + } X509Certificate[] existingCaCerts = existingEnterpriseConfig.getCaCertificates(); X509Certificate[] newCaCerts = newEnterpriseConfig.getCaCertificates(); if (!Arrays.equals(existingCaCerts, newCaCerts)) { |