diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-08-27 21:04:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-08-27 21:04:20 +0000 |
commit | edc209e114cb84977b592bd4ef2fe8203a68951c (patch) | |
tree | e8c030a47a296fef1d8ed354b9a30df951a722fd /service | |
parent | 90a864d13085e37bb8798fa64984d2876870fbd4 (diff) | |
parent | 2ac7bbd85d016d5baf582cd6f04dda6f434a3c9f (diff) |
Merge "[Enterprise] Fix hasEnterpriseConfigChanged method" into rvc-qpr-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigurationUtil.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigurationUtil.java b/service/java/com/android/server/wifi/WifiConfigurationUtil.java index f37472ead..336d97810 100644 --- a/service/java/com/android/server/wifi/WifiConfigurationUtil.java +++ b/service/java/com/android/server/wifi/WifiConfigurationUtil.java @@ -224,6 +224,11 @@ public class WifiConfigurationUtil { if (existingEnterpriseConfig.getEapMethod() != newEnterpriseConfig.getEapMethod()) { return true; } + if (existingEnterpriseConfig.isAuthenticationSimBased()) { + // No other credential changes for SIM based methods. + // The SIM card is the credential. + return false; + } if (existingEnterpriseConfig.getPhase2Method() != newEnterpriseConfig.getPhase2Method()) { return true; @@ -232,8 +237,7 @@ public class WifiConfigurationUtil { newEnterpriseConfig.getIdentity())) { return true; } - if (!existingEnterpriseConfig.isAuthenticationSimBased() - && !TextUtils.equals(existingEnterpriseConfig.getAnonymousIdentity(), + if (!TextUtils.equals(existingEnterpriseConfig.getAnonymousIdentity(), newEnterpriseConfig.getAnonymousIdentity())) { return true; } @@ -246,6 +250,21 @@ public class WifiConfigurationUtil { if (!Arrays.equals(existingCaCerts, newCaCerts)) { return true; } + if (!Arrays.equals(newEnterpriseConfig.getCaCertificateAliases(), + existingEnterpriseConfig.getCaCertificateAliases())) { + return true; + } + if (!TextUtils.equals(newEnterpriseConfig.getClientCertificateAlias(), + existingEnterpriseConfig.getClientCertificateAlias())) { + return true; + } + if (!TextUtils.equals(newEnterpriseConfig.getAltSubjectMatch(), + existingEnterpriseConfig.getAltSubjectMatch())) { + return true; + } + if (newEnterpriseConfig.getOcsp() != existingEnterpriseConfig.getOcsp()) { + return true; + } } else { // One of the configs may have an enterpriseConfig if (existingEnterpriseConfig != null || newEnterpriseConfig != null) { |