summaryrefslogtreecommitdiffstats
path: root/wifi/java/android/net/wifi/SupplicantState.java
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-06-10 14:00:27 -0700
committerIrfan Sheriff <isheriff@google.com>2011-06-10 17:02:48 -0700
commit1523da22e91217e06a01610c202d5e52c2e9dfce (patch)
treef21880617440a21d403750c00223b8e49da7bdcf /wifi/java/android/net/wifi/SupplicantState.java
parente14674d51555e7c270fb10e465e906fc1b0cd607 (diff)
downloadframeworks_base-1523da22e91217e06a01610c202d5e52c2e9dfce.zip
frameworks_base-1523da22e91217e06a01610c202d5e52c2e9dfce.tar.gz
frameworks_base-1523da22e91217e06a01610c202d5e52c2e9dfce.tar.bz2
Fix driver start/stop handling
The driver start and stop events will be removed as they are now redundant (and incorrect) Move to using supplicant INTERFACE_DISABLED indication for deciding if driver has started or stopped When driver start is given, the supplicant will first switch to INTERFACE_DISABLED state and then out of it to start connecting. We should use this indication to find out driver has started When driver stop is given, the supplicant will just switch to INTERFACE_DISABLED state and this indicates driver has stopped Bug: 4550125 Change-Id: I242cda97951a733c8707c8d99cdfcc9a33b75c2d
Diffstat (limited to 'wifi/java/android/net/wifi/SupplicantState.java')
-rw-r--r--wifi/java/android/net/wifi/SupplicantState.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/SupplicantState.java b/wifi/java/android/net/wifi/SupplicantState.java
index 91e685f..509b02c 100644
--- a/wifi/java/android/net/wifi/SupplicantState.java
+++ b/wifi/java/android/net/wifi/SupplicantState.java
@@ -216,6 +216,28 @@ public enum SupplicantState implements Parcelable {
}
}
+ static boolean isDriverActive(SupplicantState state) {
+ switch(state) {
+ case DISCONNECTED:
+ case DORMANT:
+ case INACTIVE:
+ case AUTHENTICATING:
+ case ASSOCIATING:
+ case ASSOCIATED:
+ case SCANNING:
+ case FOUR_WAY_HANDSHAKE:
+ case GROUP_HANDSHAKE:
+ case COMPLETED:
+ return true;
+ case INTERFACE_DISABLED:
+ case UNINITIALIZED:
+ case INVALID:
+ return false;
+ default:
+ throw new IllegalArgumentException("Unknown supplicant state");
+ }
+ }
+
/** Implement the Parcelable interface {@hide} */
public int describeContents() {
return 0;