summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiMonitor.java
diff options
context:
space:
mode:
authorSohani Rao <sohanirao@google.com>2017-02-06 14:02:17 -0800
committerSohani Rao <sohanirao@google.com>2017-03-30 17:27:20 -0700
commitefab6719309021b890dc39b1a7434ea6b7f7bb64 (patch)
treebcdd4eb5f86adea76f862d4f1c7ddcf0c9379f9d /service/java/com/android/server/wifi/WifiMonitor.java
parent6236c87501a724cdb4e727b1631ee11db106460c (diff)
downloadandroid_frameworks_opt_net_wifi-efab6719309021b890dc39b1a7434ea6b7f7bb64.tar.gz
android_frameworks_opt_net_wifi-efab6719309021b890dc39b1a7434ea6b7f7bb64.tar.bz2
android_frameworks_opt_net_wifi-efab6719309021b890dc39b1a7434ea6b7f7bb64.zip
Send Auth failure reason in broadcast intent
SupplicantStateChange broadcast intent for authentication failure doesn't capture the reason for authentication failure. To indicate this reason to the user, use the newly defined (but hidden), auth failure codes to make the intent richer. Bug: 33245941 Test: Unit test Change-Id: I76496cfc7365103d9ec74b12d60bde772fcba801
Diffstat (limited to 'service/java/com/android/server/wifi/WifiMonitor.java')
-rw-r--r--service/java/com/android/server/wifi/WifiMonitor.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/service/java/com/android/server/wifi/WifiMonitor.java b/service/java/com/android/server/wifi/WifiMonitor.java
index 6c8ac813f..d1903a0de 100644
--- a/service/java/com/android/server/wifi/WifiMonitor.java
+++ b/service/java/com/android/server/wifi/WifiMonitor.java
@@ -96,15 +96,6 @@ public class WifiMonitor {
/* hotspot 2.0 events */
public static final int HS20_REMEDIATION_EVENT = BASE + 61;
- /**
- * Authentication Failure reasonCode, used internally by WifiStateMachine
- * @hide
- */
- public static final int AUTHENTICATION_FAILURE_REASON_DEFAULT = 0;
- public static final int AUTHENTICATION_FAILURE_REASON_TIMEOUT = 1;
- public static final int AUTHENTICATION_FAILURE_REASON_WRONG_PSWD = 2;
- public static final int AUTHENTICATION_FAILURE_REASON_EAP_FAILURE = 3;
-
/* WPS config errrors */
private static final int CONFIG_MULTIPLE_PBC_DETECTED = 12;
private static final int CONFIG_AUTH_FAILURE = 18;
@@ -480,7 +471,10 @@ public class WifiMonitor {
*
* @param iface Name of iface on which this occurred.
* @param reason Reason for authentication failure. This has to be one of the
- * |AUTHENTICATION_FAILURE_REASON_*| reason codes.
+ * {@link android.net.wifi.WifiManager#ERROR_AUTH_FAILURE_NONE},
+ * {@link android.net.wifi.WifiManager#ERROR_AUTH_FAILURE_TIMEOUT},
+ * {@link android.net.wifi.WifiManager#ERROR_AUTH_FAILURE_WRONG_PSWD},
+ * {@link android.net.wifi.WifiManager#ERROR_AUTH_FAILURE_EAP_FAILURE}
*/
public void broadcastAuthenticationFailureEvent(String iface, int reason) {
sendMessage(iface, AUTHENTICATION_FAILURE_EVENT, 0, reason);