public static enum NetworkInfo.State extends Enum<NetworkInfo.State>
DetailedState
.
The mapping between the two is as follows:
Detailed state | Coarse-grained state |
IDLE | DISCONNECTED |
SCANNING | CONNECTING |
CONNECTING | CONNECTING |
AUTHENTICATING | CONNECTING |
CONNECTED | CONNECTED |
DISCONNECTING | DISCONNECTING |
DISCONNECTED | DISCONNECTED |
UNAVAILABLE | DISCONNECTED |
FAILED | DISCONNECTED |
Enum Constant and Description |
---|
CONNECTED |
CONNECTING |
DISCONNECTED |
DISCONNECTING |
SUSPENDED |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static NetworkInfo.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NetworkInfo.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NetworkInfo.State CONNECTING
public static final NetworkInfo.State CONNECTED
public static final NetworkInfo.State SUSPENDED
public static final NetworkInfo.State DISCONNECTING
public static final NetworkInfo.State DISCONNECTED
public static final NetworkInfo.State UNKNOWN
public static NetworkInfo.State[] values()
for (NetworkInfo.State c : NetworkInfo.State.values()) System.out.println(c);
public static NetworkInfo.State valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is null