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

Commit 18141004 authored by Yuhao Zheng's avatar Yuhao Zheng Committed by Android (Google) Code Review
Browse files

Merge "Add two Passpoint fields to WifiConfiguration"

parents 3c8fa3b3 5f9385f7
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);