summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mukesh Agrawal <quiche@google.com> 2018-01-25 00:59:47 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-01-25 00:59:47 +0000
commit5e24057999b51f13d868dbe46f74701cb403697e (patch)
tree315b85b5c80e62705c8f80c7de37d05861da2ca2
parent1e39ade047555cb5de184c4a09adb1fe51afb735 (diff)
parent897b1e92c3fd1169e3e8ea5cea65137e7713c1fb (diff)
Merge changes I72baa5ca,I0366341a
* changes: WifiConfiguration: deprecate WPA-1 related fields WifiConfiguration: deprecate WEP-related fields
-rw-r--r--api/current.txt16
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java45
2 files changed, 44 insertions, 17 deletions
diff --git a/api/current.txt b/api/current.txt
index 61465acd362c..b869fe324f67 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -27586,14 +27586,14 @@ package android.net.wifi {
field public java.lang.String providerFriendlyName;
field public long[] roamingConsortiumIds;
field public int status;
- field public java.lang.String[] wepKeys;
- field public int wepTxKeyIndex;
+ field public deprecated java.lang.String[] wepKeys;
+ field public deprecated int wepTxKeyIndex;
}
public static class WifiConfiguration.AuthAlgorithm {
field public static final int LEAP = 2; // 0x2
field public static final int OPEN = 0; // 0x0
- field public static final int SHARED = 1; // 0x1
+ field public static final deprecated int SHARED = 1; // 0x1
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "auth_alg";
}
@@ -27601,8 +27601,8 @@ package android.net.wifi {
public static class WifiConfiguration.GroupCipher {
field public static final int CCMP = 3; // 0x3
field public static final int TKIP = 2; // 0x2
- field public static final int WEP104 = 1; // 0x1
- field public static final int WEP40 = 0; // 0x0
+ field public static final deprecated int WEP104 = 1; // 0x1
+ field public static final deprecated int WEP40 = 0; // 0x0
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "group";
}
@@ -27611,7 +27611,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";
}
@@ -27619,14 +27619,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";
}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 9e2ac263c26e..8d1a00b09d94 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -55,8 +55,10 @@ public class WifiConfiguration implements Parcelable {
/** {@hide} */
public static final String pskVarName = "psk";
/** {@hide} */
+ @Deprecated
public static final String[] wepKeyVarNames = { "wep_key0", "wep_key1", "wep_key2", "wep_key3" };
/** {@hide} */
+ @Deprecated
public static final String wepTxKeyIdxVarName = "wep_tx_keyidx";
/** {@hide} */
public static final String priorityVarName = "priority";
@@ -83,6 +85,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;
@@ -116,8 +121,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" };
}
/**
@@ -126,7 +131,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;
@@ -148,7 +156,10 @@ public class WifiConfiguration implements Parcelable {
/** Open System authentication (required for WPA/WPA2) */
public static final int OPEN = 0;
- /** Shared Key authentication (requires static WEP keys) */
+ /** Shared Key authentication (requires static WEP keys)
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int SHARED = 1;
/** LEAP/Network EAP (only used with LEAP) */
public static final int LEAP = 2;
@@ -166,7 +177,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;
@@ -188,9 +202,15 @@ public class WifiConfiguration implements Parcelable {
public static class GroupCipher {
private GroupCipher() { }
- /** WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11) */
+ /** WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11)
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int WEP40 = 0;
- /** WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key */
+ /** WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int WEP104 = 1;
/** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] */
public static final int TKIP = 2;
@@ -204,7 +224,8 @@ public class WifiConfiguration implements Parcelable {
public static final String varName = "group";
public static final String[] strings =
- { "WEP40", "WEP104", "TKIP", "CCMP", "GTK_NOT_USED" };
+ { /* deprecated */ "WEP40", /* deprecated */ "WEP104",
+ "TKIP", "CCMP", "GTK_NOT_USED" };
}
/** Possible status of a network configuration. */
@@ -310,10 +331,16 @@ public class WifiConfiguration implements Parcelable {
* When the value of one of these keys is read, the actual key is
* not returned, just a "*" if the key has a value, or the null
* string otherwise.
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged.
*/
+ @Deprecated
public String[] wepKeys;
- /** Default WEP key index, ranging from 0 to 3. */
+ /** Default WEP key index, ranging from 0 to 3.
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public int wepTxKeyIndex;
/**