From 8f1a910ad8fa4dc2867de1c2badcdb6ad37cb9e6 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Wed, 14 Mar 2018 15:10:18 -0700 Subject: [PATCH] WifiConfiguration: Undeprecate WPA_PSK This is needed for client mode operations for configuring WPA_PSK networks. There is no alternative public value for WPA_PSK. The intention was to deprecate usage of this value for AP mode, but since we share the same object across client & AP mode operations, we cannot mark this field deprecated. Bug: 72332080 Test: make update-api Change-Id: I75f675b630080d853422f945d7cbc37c5f205fde --- api/current.txt | 2 +- wifi/java/android/net/wifi/WifiConfiguration.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/current.txt b/api/current.txt index b3be727272ab..04f1f17b0398 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28677,7 +28677,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 deprecated int WPA_PSK = 1; // 0x1 + field public static final int WPA_PSK = 1; // 0x1 field public static final java.lang.String[] strings; field public static final java.lang.String varName = "key_mgmt"; } diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 93fa5987aa9c..6865f77fa717 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -86,9 +86,6 @@ 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; @@ -122,7 +119,7 @@ public class WifiConfiguration implements Parcelable { public static final String varName = "key_mgmt"; - public static final String[] strings = { "NONE", /* deprecated */ "WPA_PSK", "WPA_EAP", + public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP", "IEEE8021X", "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP" }; } -- 2.11.0