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

Commit e4c27ec4 authored by Sravanthi Palakonda's avatar Sravanthi Palakonda Committed by Linux Build Service Account
Browse files

wifi: Enhance WiFi Configuration to also include sim number.

For EAP SIM/AKA/AKA` authentication to happen on a specific SIM , the
SIM number has to be also a part of Wi-Fi configuration . This commit
ensures the same.

Change-Id: I3239c534bd8d221dc0af0174304427491a1d586b
CRs-Fixed: 1030715
parent e0a7652f
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ public class WifiConfiguration implements Parcelable {

    /** {@hide} */
    private String mPasspointManagementObjectTree;
    /** {@hide} */
    public static final String SIMNumVarName = "sim_num";

    /**
     * Recognized key management schemes.
@@ -446,6 +448,12 @@ public class WifiConfiguration implements Parcelable {
    @SystemApi
    public String lastUpdateName;

    /**
     * @hide
     * sim number selected
     */
    public int SIMNum;

    /**
     * @hide
     * Status of user approval for connection
@@ -1350,6 +1358,7 @@ public class WifiConfiguration implements Parcelable {
        creatorUid = -1;
        shared = true;
        dtimInterval = 0;
        SIMNum = 0;
    }

    /**
@@ -1511,6 +1520,10 @@ public class WifiConfiguration implements Parcelable {
        if (this.preSharedKey != null) {
            sbuf.append('*');
        }
        sbuf.append('\n').append(" sim_num ");
        if (this.SIMNum > 0 ) {
            sbuf.append('*');
        }
        sbuf.append("\nEnterprise config:\n");
        sbuf.append(enterpriseConfig);

@@ -1907,6 +1920,7 @@ public class WifiConfiguration implements Parcelable {
            creationTime = source.creationTime;
            updateTime = source.updateTime;
            shared = source.shared;
            SIMNum = source.SIMNum;
        }
    }

@@ -1977,6 +1991,7 @@ public class WifiConfiguration implements Parcelable {
        dest.writeInt(noInternetAccessExpected ? 1 : 0);
        dest.writeInt(shared ? 1 : 0);
        dest.writeString(mPasspointManagementObjectTree);
        dest.writeInt(SIMNum);
    }

    /** Implement the Parcelable interface {@hide} */
@@ -2048,6 +2063,7 @@ public class WifiConfiguration implements Parcelable {
                config.noInternetAccessExpected = in.readInt() != 0;
                config.shared = in.readInt() != 0;
                config.mPasspointManagementObjectTree = in.readString();
                config.SIMNum = in.readInt();
                return config;
            }