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

Commit 9d57adef authored by Nate(Qiang) Jiang's avatar Nate(Qiang) Jiang
Browse files

make requireSimCredential() public API

make this API to public for Settings App use.

Bug: 147310480
Test: atest android.net.wifi
Change-Id: I809afcfc8da4906aaf7bd884d723c4d42d538282
parent fc952f32
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
+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;
    }