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

Commit b5ebb176 authored by David Su's avatar David Su Committed by Android (Google) Code Review
Browse files

Merge "Expose WifiConfig.setSecurityParams as public API"

parents 3f38fcd6 592f8d52
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -30743,9 +30743,19 @@ package android.net.wifi {
    method @Deprecated @NonNull public android.net.MacAddress getRandomizedMacAddress();
    method @Deprecated public boolean isPasspoint();
    method @Deprecated public void setHttpProxy(android.net.ProxyInfo);
    method @Deprecated public void setSecurityParams(int);
    method public void writeToParcel(android.os.Parcel, int);
    field @Deprecated public String BSSID;
    field @Deprecated public String FQDN;
    field @Deprecated public static final int SECURITY_TYPE_EAP = 3; // 0x3
    field @Deprecated public static final int SECURITY_TYPE_EAP_SUITE_B = 5; // 0x5
    field @Deprecated public static final int SECURITY_TYPE_OPEN = 0; // 0x0
    field @Deprecated public static final int SECURITY_TYPE_OWE = 6; // 0x6
    field @Deprecated public static final int SECURITY_TYPE_PSK = 2; // 0x2
    field @Deprecated public static final int SECURITY_TYPE_SAE = 4; // 0x4
    field @Deprecated public static final int SECURITY_TYPE_WAPI_CERT = 8; // 0x8
    field @Deprecated public static final int SECURITY_TYPE_WAPI_PSK = 7; // 0x7
    field @Deprecated public static final int SECURITY_TYPE_WEP = 1; // 0x1
    field @Deprecated public String SSID;
    field @Deprecated @NonNull public java.util.BitSet allowedAuthAlgorithms;
    field @Deprecated @NonNull public java.util.BitSet allowedGroupCiphers;
+25 −16
Original line number Diff line number Diff line
@@ -402,29 +402,29 @@ public class WifiConfiguration implements Parcelable {
        public static final String[] strings = { "current", "disabled", "enabled" };
    }

    /**
     * Security types we support.
     */
    /** @hide */
    /** Security type for an open network. */
    public static final int SECURITY_TYPE_OPEN = 0;
    /** @hide */
    /** Security type for a WEP network. */
    public static final int SECURITY_TYPE_WEP = 1;
    /** @hide */
    /** Security type for a PSK network. */
    public static final int SECURITY_TYPE_PSK = 2;
    /** @hide */
    /** Security type for an EAP network. */
    public static final int SECURITY_TYPE_EAP = 3;
    /** @hide */
    /** Security type for an SAE network. */
    public static final int SECURITY_TYPE_SAE = 4;
    /** @hide */
    /** Security type for an EAP Suite B network. */
    public static final int SECURITY_TYPE_EAP_SUITE_B = 5;
    /** @hide */
    /** Security type for an OWE network. */
    public static final int SECURITY_TYPE_OWE = 6;
    /** @hide */
    /** Security type for a WAPI PSK network. */
    public static final int SECURITY_TYPE_WAPI_PSK = 7;
    /** @hide */
    /** Security type for a WAPI Certificate network. */
    public static final int SECURITY_TYPE_WAPI_CERT = 8;

    /** @hide */
    /**
     * Security types we support.
     * @hide
     */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(prefix = { "SECURITY_TYPE_" }, value = {
            SECURITY_TYPE_OPEN,
@@ -440,10 +440,19 @@ public class WifiConfiguration implements Parcelable {
    public @interface SecurityType {}

    /**
     * @hide
     * Set security params (sets the various bitsets exposed in WifiConfiguration).
     * Set the various security params to correspond to the provided security type.
     * This is accomplished by setting the various BitSets exposed in WifiConfiguration.
     *
     * @param securityType One of the security types from {@link SecurityType}.
     * @param securityType One of the following security types:
     * {@link #SECURITY_TYPE_OPEN},
     * {@link #SECURITY_TYPE_WEP},
     * {@link #SECURITY_TYPE_PSK},
     * {@link #SECURITY_TYPE_EAP},
     * {@link #SECURITY_TYPE_SAE},
     * {@link #SECURITY_TYPE_EAP_SUITE_B},
     * {@link #SECURITY_TYPE_OWE},
     * {@link #SECURITY_TYPE_WAPI_PSK}, or
     * {@link #SECURITY_TYPE_WAPI_CERT}
     */
    public void setSecurityParams(@SecurityType int securityType) {
        // Clear all the bitsets.