Wifi: Disable network when detecting carrier eap error
Disable network temporarily when detecting carrier eap error Bug: 148940011 Test: atest FrameworksWifiTests Test: make sure network can be disabled when detecting carrier eap error Change-Id: Ide5f8b2a084ce3d72b6ba820393b9fb9b22aff0f
This commit is contained in:
@@ -393,6 +393,8 @@ package android.net.wifi {
|
||||
method @Deprecated public boolean hasEverConnected();
|
||||
field @Deprecated public static final int DISABLED_ASSOCIATION_REJECTION = 1; // 0x1
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE = 2; // 0x2
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE_CARRIER_SPECIFIC = 10; // 0xa
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE_GENERIC = 2; // 0x2
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_CREDENTIALS = 5; // 0x5
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9; // 0x9
|
||||
field @Deprecated public static final int DISABLED_BY_WIFI_MANAGER = 7; // 0x7
|
||||
|
||||
@@ -1388,7 +1388,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
|
||||
@@ -1401,8 +1403,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. */
|
||||
@@ -1420,11 +1430,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
|
||||
@@ -1564,6 +1576,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user