diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-12-15 07:48:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-12-15 07:48:53 +0000 |
commit | 1ecd270dbe178b14ef6cae697582749a1a05de50 (patch) | |
tree | 1921e98e23763ad9db6ae25c0c33aa3982024cea /wifi/java | |
parent | 7cb30de8007419b6b9d3ce35f7c770061f85e2a3 (diff) | |
parent | 48b6f8616fbc08825837ea420456cf17871dcd20 (diff) |
Merge "Wifi: Disable network when detecting carrier eap error"
Diffstat (limited to 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 2a98977fc08e..ba4a54f9a489 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -1708,7 +1708,9 @@ public class WifiConfiguration implements Parcelable { DISABLED_NO_INTERNET_PERMANENT, DISABLED_BY_WIFI_MANAGER, DISABLED_BY_WRONG_PASSWORD, - DISABLED_AUTHENTICATION_NO_SUBSCRIPTION}) + DISABLED_AUTHENTICATION_NO_SUBSCRIPTION, + DISABLED_AUTHENTICATION_FAILURE_GENERIC, + DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC}) public @interface NetworkSelectionDisableReason {} // Quality Network disabled reasons @@ -1721,8 +1723,16 @@ public class WifiConfiguration implements Parcelable { public static final int NETWORK_SELECTION_DISABLED_STARTING_INDEX = 1; /** This network is temporarily disabled because of multiple association rejections. */ public static final int DISABLED_ASSOCIATION_REJECTION = 1; - /** This network is temporarily disabled because of multiple authentication failure. */ - public static final int DISABLED_AUTHENTICATION_FAILURE = 2; + /** This network is disabled due to generic authentication failure. */ + public static final int DISABLED_AUTHENTICATION_FAILURE_GENERIC = 2; + /** Separate DISABLED_AUTHENTICATION_FAILURE into DISABLED_AUTHENTICATION_FAILURE_GENERIC + * and DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC + * @deprecated Use the {@link #DISABLED_AUTHENTICATION_FAILURE_GENERIC} constant + * (which is the same value). + */ + @Deprecated + public static final int DISABLED_AUTHENTICATION_FAILURE = + DISABLED_AUTHENTICATION_FAILURE_GENERIC; /** This network is temporarily disabled because of multiple DHCP failure. */ public static final int DISABLED_DHCP_FAILURE = 3; /** This network is temporarily disabled because it has no Internet access. */ @@ -1740,11 +1750,13 @@ public class WifiConfiguration implements Parcelable { public static final int DISABLED_BY_WRONG_PASSWORD = 8; /** This network is permanently disabled because service is not subscribed. */ public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9; + /** This network is disabled due to carrier specific EAP failure. */ + public static final int DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC = 10; /** * All other disable reasons should be strictly less than this value. * @hide */ - public static final int NETWORK_SELECTION_DISABLED_MAX = 10; + public static final int NETWORK_SELECTION_DISABLED_MAX = 11; /** * Get an integer that is equal to the maximum integer value of all the @@ -1884,6 +1896,18 @@ public class WifiConfiguration implements Parcelable { 1, Integer.MAX_VALUE)); + reasons.append(DISABLED_AUTHENTICATION_FAILURE_GENERIC, + new DisableReasonInfo( + "NETWORK_SELECTION_DISABLED_AUTHENTICATION_FAILURE_GENERIC", + 5, + 5 * 60 * 1000)); + + reasons.append(DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC, + new DisableReasonInfo( + "NETWORK_SELECTION_DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC", + 1, + Integer.MAX_VALUE)); + return reasons; } |