Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fedb504f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "make requireSimCredential() public API"

parents 76cbe0eb 9d57adef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30356,6 +30356,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);
+6 −8
Original line number Diff line number Diff line
@@ -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;
    }