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

Commit 29ce1dab authored by Roshan Pius's avatar Roshan Pius
Browse files

WifiConfiguration: Fix isEnterprise

Add a check for the eap method in Enterpriseconfig associated with the
WifiConfiguration.

BUG: 31275240
Change-Id: I21aabb09bdd21e29a80d4b9c6ea0e2b1f0d7e2df
parent f7c508ae
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1407,8 +1407,10 @@ public class WifiConfiguration implements Parcelable {
     * @hide
     */
    public boolean isEnterprise() {
        return allowedKeyManagement.get(KeyMgmt.WPA_EAP) ||
            allowedKeyManagement.get(KeyMgmt.IEEE8021X);
        return (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
                || allowedKeyManagement.get(KeyMgmt.IEEE8021X))
                && enterpriseConfig != null
                && enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE;
    }

    @Override