Build 1.0_r1(from source)

android.net.wifi
Enum SupplicantState

java.lang.Object
  extended by java.lang.Enum<SupplicantState>
      extended by android.net.wifi.SupplicantState
All Implemented Interfaces:
Parcelable, Serializable, Comparable<SupplicantState>

public enum SupplicantState
extends Enum<SupplicantState>
implements Parcelable

From defs.h in wpa_supplicant.

These enumeration values are used to indicate the current wpa_supplicant state. This is more fine-grained than most users will be interested in. In general, it is better to use NetworkInfo.State.

Note, the order of these enum constants must match the numerical values of the state constants in defs.h in wpa_supplicant.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Enum Constant Summary
ASSOCIATED
          Association completed.
ASSOCIATING
          Trying to associate with a BSS/SSID.
COMPLETED
          All authentication completed.
DISCONNECTED
          This state indicates that client is not associated, but is likely to start looking for an access point.
DORMANT
          An Android-added state that is reported when a client issues an explicit DISCONNECT command.
FOUR_WAY_HANDSHAKE
          WPA 4-Way Key Handshake in progress.
GROUP_HANDSHAKE
          WPA Group Key Handshake in progress.
INACTIVE
          Inactive state (wpa_supplicant disabled).
INVALID
          A pseudo-state that should normally never be seen.
SCANNING
          Scanning for a network.
UNINITIALIZED
          No connection to wpa_supplicant.
 
Field Summary
static Parcelable.Creator<SupplicantState> CREATOR
          Implement the Parcelable interface
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Method Summary
 int describeContents()
          Implement the Parcelable interface
static boolean isValidState(SupplicantState state)
          Returns true if the supplicant state is valid and false otherwise.
static SupplicantState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SupplicantState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void writeToParcel(Parcel dest, int flags)
          Implement the Parcelable interface
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DISCONNECTED

public static final SupplicantState DISCONNECTED
This state indicates that client is not associated, but is likely to start looking for an access point. This state is entered when a connection is lost.


INACTIVE

public static final SupplicantState INACTIVE
Inactive state (wpa_supplicant disabled).

This state is entered if there are no enabled networks in the configuration. wpa_supplicant is not trying to associate with a new network and external interaction (e.g., ctrl_iface call to add or enable a network) is needed to start association.


SCANNING

public static final SupplicantState SCANNING
Scanning for a network.

This state is entered when wpa_supplicant starts scanning for a network.


ASSOCIATING

public static final SupplicantState ASSOCIATING
Trying to associate with a BSS/SSID.

This state is entered when wpa_supplicant has found a suitable BSS to associate with and the driver is configured to try to associate with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this state is entered when the driver is configured to try to associate with a network using the configured SSID and security policy.


ASSOCIATED

public static final SupplicantState ASSOCIATED
Association completed.

This state is entered when the driver reports that association has been successfully completed with an AP. If IEEE 802.1X is used (with or without WPA/WPA2), wpa_supplicant remains in this state until the IEEE 802.1X/EAPOL authentication has been completed.


FOUR_WAY_HANDSHAKE

public static final SupplicantState FOUR_WAY_HANDSHAKE
WPA 4-Way Key Handshake in progress.

This state is entered when WPA/WPA2 4-Way Handshake is started. In case of WPA-PSK, this happens when receiving the first EAPOL-Key frame after association. In case of WPA-EAP, this state is entered when the IEEE 802.1X/EAPOL authentication has been completed.


GROUP_HANDSHAKE

public static final SupplicantState GROUP_HANDSHAKE
WPA Group Key Handshake in progress.

This state is entered when 4-Way Key Handshake has been completed (i.e., when the supplicant sends out message 4/4) and when Group Key rekeying is started by the AP (i.e., when supplicant receives message 1/2).


COMPLETED

public static final SupplicantState COMPLETED
All authentication completed.

This state is entered when the full authentication process is completed. In case of WPA2, this happens when the 4-Way Handshake is successfully completed. With WPA, this state is entered after the Group Key Handshake; with IEEE 802.1X (non-WPA) connection is completed after dynamic keys are received (or if not used, after the EAP authentication has been completed). With static WEP keys and plaintext connections, this state is entered when an association has been completed.

This state indicates that the supplicant has completed its processing for the association phase and that data connection is fully configured. Note, however, that there may not be any IP address associated with the connection yet. Typically, a DHCP request needs to be sent at this point to obtain an address.


DORMANT

public static final SupplicantState DORMANT
An Android-added state that is reported when a client issues an explicit DISCONNECT command. In such a case, the supplicant is not only dissociated from the current access point (as for the DISCONNECTED state above), but it also does not attempt to connect to any access point until a RECONNECT or REASSOCIATE command is issued by the client.


UNINITIALIZED

public static final SupplicantState UNINITIALIZED
No connection to wpa_supplicant.

This is an additional pseudo-state to handle the case where wpa_supplicant is not running and/or we have not been able to establish a connection to it.


INVALID

public static final SupplicantState INVALID
A pseudo-state that should normally never be seen.

Field Detail

CREATOR

public static final Parcelable.Creator<SupplicantState> CREATOR
Implement the Parcelable interface

Method Detail

values

public static SupplicantState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SupplicantState c : SupplicantState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SupplicantState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isValidState

public static boolean isValidState(SupplicantState state)
Returns true if the supplicant state is valid and false otherwise.

Parameters:
state - The supplicant state
Returns:
true if the supplicant state is valid and false otherwise.

describeContents

public int describeContents()
Implement the Parcelable interface

Specified by:
describeContents in interface Parcelable
Returns:
a bitmask indicating the set of special object types marshalled by the Parcelable.

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)
Implement the Parcelable interface

Specified by:
writeToParcel in interface Parcelable
Parameters:
dest - The Parcel in which the object should be written.
flags - Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature