Methods Summary |
---|
public int | describeContents()Implement the Parcelable interface {@hide}
return 0;
|
public java.lang.String | getBSSID()Return the basic service set identifier (BSSID) of the current access point.
The BSSID may be {@code null} if there is no network currently connected.
return mBSSID;
|
public static android.net.NetworkInfo.DetailedState | getDetailedStateOf(SupplicantState suppState)Map a supplicant state into a fine-grained network connectivity state.
return stateMap.get(suppState);
|
public boolean | getHiddenSSID()
return mHiddenSSID;
|
public int | getIpAddress()
return mIpAddress;
|
public int | getLinkSpeed()Returns the current link speed in {@link #LINK_SPEED_UNITS}.
return mLinkSpeed;
|
public java.lang.String | getMacAddress()
return mMacAddress;
|
public int | getNetworkId()Each configured network has a unique small integer ID, used to identify
the network when performing operations on the supplicant. This method
returns the ID for the currently connected network.
return mNetworkId;
|
public int | getRssi()Returns the received signal strength indicator of the current 802.11
network.
This is not normalized, but should be!
return mRssi;
|
public java.lang.String | getSSID()Returns the service set identifier (SSID) of the current 802.11 network.
If the SSID is an ASCII string, it will be returned surrounded by double
quotation marks.Otherwise, it is returned as a string of hex digits. The
SSID may be {@code null} if there is no network currently connected.
return mSSID;
|
public SupplicantState | getSupplicantState()Return the detailed state of the supplicant's negotiation with an
access point, in the form of a {@link SupplicantState SupplicantState} object.
return mSupplicantState;
|
void | setBSSID(java.lang.String BSSID)
mBSSID = BSSID;
|
public void | setHiddenSSID(boolean hiddenSSID){@hide}
mHiddenSSID = hiddenSSID;
|
void | setIpAddress(int address)
mIpAddress = address;
|
void | setLinkSpeed(int linkSpeed)
this.mLinkSpeed = linkSpeed;
|
void | setMacAddress(java.lang.String macAddress)Record the MAC address of the WLAN interface
this.mMacAddress = macAddress;
|
void | setNetworkId(int id)
mNetworkId = id;
|
void | setRssi(int rssi)
mRssi = rssi;
|
void | setSSID(java.lang.String SSID)
mSSID = SSID;
// network is considered not hidden by default
mHiddenSSID = false;
|
void | setSupplicantState(SupplicantState state)
mSupplicantState = state;
|
void | setSupplicantState(java.lang.String stateName)Set the SupplicantState from the string name
of the state.
mSupplicantState = valueOf(stateName);
|
public java.lang.String | toString()
StringBuffer sb = new StringBuffer();
String none = "<none>";
sb.append("SSID: ").append(mSSID == null ? none : mSSID).
append(", BSSID: ").append(mBSSID == null ? none : mBSSID).
append(", MAC: ").append(mMacAddress == null ? none : mMacAddress).
append(", Supplicant state: ").
append(mSupplicantState == null ? none : mSupplicantState).
append(", RSSI: ").append(mRssi).
append(", Link speed: ").append(mLinkSpeed).
append(", Net ID: ").append(mNetworkId);
return sb.toString();
|
static SupplicantState | valueOf(java.lang.String stateName)
if ("4WAY_HANDSHAKE".equalsIgnoreCase(stateName))
return SupplicantState.FOUR_WAY_HANDSHAKE;
else {
try {
return SupplicantState.valueOf(stateName.toUpperCase());
} catch (IllegalArgumentException e) {
return SupplicantState.INVALID;
}
}
|
public void | writeToParcel(android.os.Parcel dest, int flags)Implement the Parcelable interface {@hide}
dest.writeInt(mNetworkId);
dest.writeInt(mRssi);
dest.writeInt(mLinkSpeed);
dest.writeInt(mIpAddress);
dest.writeString(getSSID());
dest.writeString(mBSSID);
dest.writeString(mMacAddress);
mSupplicantState.writeToParcel(dest, flags);
|