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

Commit 5f9385f7 authored by Yuhao Zheng's avatar Yuhao Zheng
Browse files

Add two Passpoint fields to WifiConfiguration

We need two new fields in WifiConfiguration for Hotspot 2.0:
requirePMF & updateIdentifier

Change-Id: I288fee7a413286c48eedd034a5aca60a40b831a8
parent cc32bd83
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -49,6 +49,10 @@ public class WifiConfiguration implements Parcelable {
    /** {@hide} */
    public static final String hiddenSSIDVarName = "scan_ssid";
    /** {@hide} */
    public static final String pmfVarName = "ieee80211w";
    /** {@hide} */
    public static final String updateIdentiferVarName = "update_identifier";
    /** {@hide} */
    public static final int INVALID_NETWORK_ID = -1;
    /**
     * Recognized key management schemes.
@@ -263,6 +267,18 @@ public class WifiConfiguration implements Parcelable {
     */
    public boolean hiddenSSID;

    /**
     * This is a network that requries Protected Management Frames (PMF).
     * @hide
     */
    public boolean requirePMF;

    /**
     * Update identifier, for Passpoint network.
     * @hide
     */
    public String updateIdentifier;

    /**
     * The set of key management protocols supported by this configuration.
     * See {@link KeyMgmt} for descriptions of the values.
@@ -1155,6 +1171,8 @@ public class WifiConfiguration implements Parcelable {
        dest.writeInt(wepTxKeyIndex);
        dest.writeInt(priority);
        dest.writeInt(hiddenSSID ? 1 : 0);
        dest.writeInt(requirePMF ? 1 : 0);
        dest.writeString(updateIdentifier);

        writeBitSet(dest, allowedKeyManagement);
        writeBitSet(dest, allowedProtocols);
@@ -1196,6 +1214,9 @@ public class WifiConfiguration implements Parcelable {
                config.wepTxKeyIndex = in.readInt();
                config.priority = in.readInt();
                config.hiddenSSID = in.readInt() != 0;
                config.requirePMF = in.readInt() != 0;
                config.updateIdentifier = in.readString();

                config.allowedKeyManagement   = readBitSet(in);
                config.allowedProtocols       = readBitSet(in);
                config.allowedAuthAlgorithms  = readBitSet(in);