diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | wifi/java/android/net/wifi/WifiEnterpriseConfig.java | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt index 45a4eba73a58..bf8f1ce52268 100644 --- a/api/current.txt +++ b/api/current.txt @@ -30347,6 +30347,7 @@ package android.net.wifi { method public String getPlmn(); method public String getRealm(); method @Deprecated public String getSubjectMatch(); + method public boolean isAuthenticationSimBased(); method public void setAltSubjectMatch(String); method public void setAnonymousIdentity(String); method public void setCaCertificate(@Nullable java.security.cert.X509Certificate); diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java index 7a59a4f9be30..f8c107459672 100644 --- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java +++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java @@ -1336,20 +1336,18 @@ public class WifiEnterpriseConfig implements Parcelable { } /** - * If the current authentication method needs SIM card. - * @return true if the credential information require SIM card for current authentication + * Utility method to determine whether the configuration's authentication method is SIM-based. + * + * @return true if the credential information requires SIM card for current authentication * method, otherwise it returns false. - * @hide */ - public boolean requireSimCredential() { + public boolean isAuthenticationSimBased() { if (mEapMethod == Eap.SIM || mEapMethod == Eap.AKA || mEapMethod == Eap.AKA_PRIME) { return true; } if (mEapMethod == Eap.PEAP) { - if (mPhase2Method == Phase2.SIM || mPhase2Method == Phase2.AKA - || mPhase2Method == Phase2.AKA_PRIME) { - return true; - } + return mPhase2Method == Phase2.SIM || mPhase2Method == Phase2.AKA + || mPhase2Method == Phase2.AKA_PRIME; } return false; } |