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

Commit 897b1e92 authored by mukesh agrawal's avatar mukesh agrawal Committed by Mukesh Agrawal
Browse files

WifiConfiguration: deprecate WPA-1 related fields

WPA-1 provides poor confidentiality, and limits
throughput of multicast traffic. WPA-1 is also
not widely used.

Mark WPA-1 related fields as deprecated, to communicate
our intent to deprecate WPA-1 connections.

This does not affect WPA-2 ("RSN") connections.

Bug: 72332080
Test: m -j8 update-api
Change-Id: I72baa5caa76e3ca0f46861982ed3ae5afcfcd709
parent 8b055fa3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -27394,7 +27394,7 @@ package android.net.wifi {
    field public static final int IEEE8021X = 3; // 0x3
    field public static final int NONE = 0; // 0x0
    field public static final int WPA_EAP = 2; // 0x2
    field public static final int WPA_PSK = 1; // 0x1
    field public static final deprecated int WPA_PSK = 1; // 0x1
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "key_mgmt";
  }
@@ -27402,14 +27402,14 @@ package android.net.wifi {
  public static class WifiConfiguration.PairwiseCipher {
    field public static final int CCMP = 2; // 0x2
    field public static final int NONE = 0; // 0x0
    field public static final int TKIP = 1; // 0x1
    field public static final deprecated int TKIP = 1; // 0x1
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "pairwise";
  }
  public static class WifiConfiguration.Protocol {
    field public static final int RSN = 1; // 0x1
    field public static final int WPA = 0; // 0x0
    field public static final deprecated int WPA = 0; // 0x0
    field public static final java.lang.String[] strings;
    field public static final java.lang.String varName = "proto";
  }
+13 −4
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ public class WifiConfiguration implements Parcelable {
        /** WPA is not used; plaintext or static WEP could be used. */
        public static final int NONE = 0;
        /** WPA pre-shared key (requires {@code preSharedKey} to be specified). */
        /** @deprecated Due to security and performance limitations, use of WPA-1 networks
         * is discouraged. WPA-2 (RSN) should be used instead. */
        @Deprecated
        public static final int WPA_PSK = 1;
        /** WPA using EAP authentication. Generally used with an external authentication server. */
        public static final int WPA_EAP = 2;
@@ -117,8 +120,8 @@ public class WifiConfiguration implements Parcelable {

        public static final String varName = "key_mgmt";

        public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP", "IEEE8021X",
                "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP" };
        public static final String[] strings = { "NONE", /* deprecated */ "WPA_PSK", "WPA_EAP",
                "IEEE8021X", "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP" };
    }

    /**
@@ -127,7 +130,10 @@ public class WifiConfiguration implements Parcelable {
    public static class Protocol {
        private Protocol() { }

        /** WPA/IEEE 802.11i/D3.0 */
        /** WPA/IEEE 802.11i/D3.0
         * @deprecated Due to security and performance limitations, use of WPA-1 networks
         * is discouraged. WPA-2 (RSN) should be used instead. */
        @Deprecated
        public static final int WPA = 0;
        /** WPA2/IEEE 802.11i */
        public static final int RSN = 1;
@@ -170,7 +176,10 @@ public class WifiConfiguration implements Parcelable {

        /** Use only Group keys (deprecated) */
        public static final int NONE = 0;
        /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] */
        /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
         * @deprecated Due to security and performance limitations, use of WPA-1 networks
         * is discouraged. WPA-2 (RSN) should be used instead. */
        @Deprecated
        public static final int TKIP = 1;
        /** AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] */
        public static final int CCMP = 2;