diff options
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/SupplicantStateTracker.java | 38 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 94 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WpsStateMachine.java | 18 |
3 files changed, 75 insertions, 75 deletions
diff --git a/wifi/java/android/net/wifi/SupplicantStateTracker.java b/wifi/java/android/net/wifi/SupplicantStateTracker.java index 3cde949..9ae26da 100644 --- a/wifi/java/android/net/wifi/SupplicantStateTracker.java +++ b/wifi/java/android/net/wifi/SupplicantStateTracker.java @@ -16,8 +16,8 @@ package android.net.wifi; -import com.android.internal.util.HierarchicalState; -import com.android.internal.util.HierarchicalStateMachine; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; import android.net.wifi.WifiStateMachine.StateChangeResult; import android.content.Context; @@ -33,7 +33,7 @@ import android.util.Log; * - detect a failed WPA handshake that loops indefinitely * - authentication failure handling */ -class SupplicantStateTracker extends HierarchicalStateMachine { +class SupplicantStateTracker extends StateMachine { private static final String TAG = "SupplicantStateTracker"; private static final boolean DBG = false; @@ -53,14 +53,14 @@ class SupplicantStateTracker extends HierarchicalStateMachine { private Context mContext; - private HierarchicalState mUninitializedState = new UninitializedState(); - private HierarchicalState mDefaultState = new DefaultState(); - private HierarchicalState mInactiveState = new InactiveState(); - private HierarchicalState mDisconnectState = new DisconnectedState(); - private HierarchicalState mScanState = new ScanState(); - private HierarchicalState mHandshakeState = new HandshakeState(); - private HierarchicalState mCompletedState = new CompletedState(); - private HierarchicalState mDormantState = new DormantState(); + private State mUninitializedState = new UninitializedState(); + private State mDefaultState = new DefaultState(); + private State mInactiveState = new InactiveState(); + private State mDisconnectState = new DisconnectedState(); + private State mScanState = new ScanState(); + private State mHandshakeState = new HandshakeState(); + private State mCompletedState = new CompletedState(); + private State mDormantState = new DormantState(); public SupplicantStateTracker(Context context, WifiStateMachine wsm, Handler target) { super(TAG, target.getLooper()); @@ -146,7 +146,7 @@ class SupplicantStateTracker extends HierarchicalStateMachine { * HSM states *******************************************************/ - class DefaultState extends HierarchicalState { + class DefaultState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -188,21 +188,21 @@ class SupplicantStateTracker extends HierarchicalStateMachine { * or after we have lost the control channel * connection to the supplicant */ - class UninitializedState extends HierarchicalState { + class UninitializedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); } } - class InactiveState extends HierarchicalState { + class InactiveState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); } } - class DisconnectedState extends HierarchicalState { + class DisconnectedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -221,14 +221,14 @@ class SupplicantStateTracker extends HierarchicalStateMachine { } } - class ScanState extends HierarchicalState { + class ScanState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); } } - class HandshakeState extends HierarchicalState { + class HandshakeState extends State { /** * The max number of the WPA supplicant loop iterations before we * decide that the loop should be terminated: @@ -277,7 +277,7 @@ class SupplicantStateTracker extends HierarchicalStateMachine { } } - class CompletedState extends HierarchicalState { + class CompletedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -318,7 +318,7 @@ class SupplicantStateTracker extends HierarchicalStateMachine { } //TODO: remove after getting rid of the state in supplicant - class DormantState extends HierarchicalState { + class DormantState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 4346b327..afa5c1d 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -73,8 +73,8 @@ import android.util.LruCache; import com.android.internal.app.IBatteryStats; import com.android.internal.util.AsyncChannel; -import com.android.internal.util.HierarchicalState; -import com.android.internal.util.HierarchicalStateMachine; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; import java.net.InetAddress; import java.util.ArrayList; @@ -88,7 +88,7 @@ import java.util.regex.Pattern; * * @hide */ -public class WifiStateMachine extends HierarchicalStateMachine { +public class WifiStateMachine extends StateMachine { private static final String TAG = "WifiStateMachine"; private static final String NETWORKTYPE = "WIFI"; @@ -348,50 +348,50 @@ public class WifiStateMachine extends HierarchicalStateMachine { private static final int MAX_RSSI = 256; /* Default parent state */ - private HierarchicalState mDefaultState = new DefaultState(); + private State mDefaultState = new DefaultState(); /* Temporary initial state */ - private HierarchicalState mInitialState = new InitialState(); + private State mInitialState = new InitialState(); /* Unloading the driver */ - private HierarchicalState mDriverUnloadingState = new DriverUnloadingState(); + private State mDriverUnloadingState = new DriverUnloadingState(); /* Loading the driver */ - private HierarchicalState mDriverUnloadedState = new DriverUnloadedState(); + private State mDriverUnloadedState = new DriverUnloadedState(); /* Driver load/unload failed */ - private HierarchicalState mDriverFailedState = new DriverFailedState(); + private State mDriverFailedState = new DriverFailedState(); /* Driver loading */ - private HierarchicalState mDriverLoadingState = new DriverLoadingState(); + private State mDriverLoadingState = new DriverLoadingState(); /* Driver loaded */ - private HierarchicalState mDriverLoadedState = new DriverLoadedState(); + private State mDriverLoadedState = new DriverLoadedState(); /* Driver loaded, waiting for supplicant to start */ - private HierarchicalState mSupplicantStartingState = new SupplicantStartingState(); + private State mSupplicantStartingState = new SupplicantStartingState(); /* Driver loaded and supplicant ready */ - private HierarchicalState mSupplicantStartedState = new SupplicantStartedState(); + private State mSupplicantStartedState = new SupplicantStartedState(); /* Waiting for supplicant to stop and monitor to exit */ - private HierarchicalState mSupplicantStoppingState = new SupplicantStoppingState(); + private State mSupplicantStoppingState = new SupplicantStoppingState(); /* Driver start issued, waiting for completed event */ - private HierarchicalState mDriverStartingState = new DriverStartingState(); + private State mDriverStartingState = new DriverStartingState(); /* Driver started */ - private HierarchicalState mDriverStartedState = new DriverStartedState(); + private State mDriverStartedState = new DriverStartedState(); /* Driver stopping */ - private HierarchicalState mDriverStoppingState = new DriverStoppingState(); + private State mDriverStoppingState = new DriverStoppingState(); /* Driver stopped */ - private HierarchicalState mDriverStoppedState = new DriverStoppedState(); + private State mDriverStoppedState = new DriverStoppedState(); /* Scan for networks, no connection will be established */ - private HierarchicalState mScanModeState = new ScanModeState(); + private State mScanModeState = new ScanModeState(); /* Connecting to an access point */ - private HierarchicalState mConnectModeState = new ConnectModeState(); + private State mConnectModeState = new ConnectModeState(); /* Fetching IP after network connection (assoc+auth complete) */ - private HierarchicalState mConnectingState = new ConnectingState(); + private State mConnectingState = new ConnectingState(); /* Connected with IP addr */ - private HierarchicalState mConnectedState = new ConnectedState(); + private State mConnectedState = new ConnectedState(); /* disconnect issued, waiting for network disconnect confirmation */ - private HierarchicalState mDisconnectingState = new DisconnectingState(); + private State mDisconnectingState = new DisconnectingState(); /* Network is not connected, supplicant assoc+auth is not complete */ - private HierarchicalState mDisconnectedState = new DisconnectedState(); + private State mDisconnectedState = new DisconnectedState(); /* Waiting for WPS to be completed*/ - private HierarchicalState mWaitForWpsCompletionState = new WaitForWpsCompletionState(); + private State mWaitForWpsCompletionState = new WaitForWpsCompletionState(); /* Soft Ap is running */ - private HierarchicalState mSoftApStartedState = new SoftApStartedState(); + private State mSoftApStartedState = new SoftApStartedState(); /** @@ -1527,7 +1527,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { * HSM states *******************************************************/ - class DefaultState extends HierarchicalState { + class DefaultState extends State { @Override public boolean processMessage(Message message) { if (DBG) Log.d(TAG, getName() + message.toString() + "\n"); @@ -1601,7 +1601,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class InitialState extends HierarchicalState { + class InitialState extends State { @Override //TODO: could move logging into a common class public void enter() { @@ -1620,7 +1620,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverLoadingState extends HierarchicalState { + class DriverLoadingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -1699,7 +1699,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverLoadedState extends HierarchicalState { + class DriverLoadedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -1752,7 +1752,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverUnloadingState extends HierarchicalState { + class DriverUnloadingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -1833,7 +1833,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverUnloadedState extends HierarchicalState { + class DriverUnloadedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -1854,7 +1854,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverFailedState extends HierarchicalState { + class DriverFailedState extends State { @Override public void enter() { Log.e(TAG, getName() + "\n"); @@ -1868,7 +1868,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } - class SupplicantStartingState extends HierarchicalState { + class SupplicantStartingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -1940,7 +1940,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class SupplicantStartedState extends HierarchicalState { + class SupplicantStartedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2063,7 +2063,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class SupplicantStoppingState extends HierarchicalState { + class SupplicantStoppingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2106,7 +2106,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverStartingState extends HierarchicalState { + class DriverStartingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2147,7 +2147,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverStartedState extends HierarchicalState { + class DriverStartedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2251,7 +2251,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverStoppingState extends HierarchicalState { + class DriverStoppingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2287,7 +2287,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DriverStoppedState extends HierarchicalState { + class DriverStoppedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2311,7 +2311,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class ScanModeState extends HierarchicalState { + class ScanModeState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2348,7 +2348,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class ConnectModeState extends HierarchicalState { + class ConnectModeState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2458,7 +2458,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class ConnectingState extends HierarchicalState { + class ConnectingState extends State { boolean mModifiedBluetoothCoexistenceMode; int mPowerMode; boolean mUseStaticIp; @@ -2656,7 +2656,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class ConnectedState extends HierarchicalState { + class ConnectedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2768,7 +2768,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DisconnectingState extends HierarchicalState { + class DisconnectingState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2798,7 +2798,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class DisconnectedState extends HierarchicalState { + class DisconnectedState extends State { private boolean mAlarmEnabled = false; private long mScanIntervalMs; @@ -2905,7 +2905,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class WaitForWpsCompletionState extends HierarchicalState { + class WaitForWpsCompletionState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -2944,7 +2944,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { } } - class SoftApStartedState extends HierarchicalState { + class SoftApStartedState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); diff --git a/wifi/java/android/net/wifi/WpsStateMachine.java b/wifi/java/android/net/wifi/WpsStateMachine.java index 32d77a1..120b228 100644 --- a/wifi/java/android/net/wifi/WpsStateMachine.java +++ b/wifi/java/android/net/wifi/WpsStateMachine.java @@ -17,8 +17,8 @@ package android.net.wifi; import com.android.internal.util.AsyncChannel; -import com.android.internal.util.HierarchicalState; -import com.android.internal.util.HierarchicalStateMachine; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; import android.content.Context; import android.content.Intent; @@ -46,7 +46,7 @@ import android.util.Log; * reloads the configuration and updates the IP and proxy * settings, if any. */ -class WpsStateMachine extends HierarchicalStateMachine { +class WpsStateMachine extends StateMachine { private static final String TAG = "WpsStateMachine"; private static final boolean DBG = false; @@ -58,9 +58,9 @@ class WpsStateMachine extends HierarchicalStateMachine { private Context mContext; AsyncChannel mReplyChannel = new AsyncChannel(); - private HierarchicalState mDefaultState = new DefaultState(); - private HierarchicalState mInactiveState = new InactiveState(); - private HierarchicalState mActiveState = new ActiveState(); + private State mDefaultState = new DefaultState(); + private State mInactiveState = new InactiveState(); + private State mActiveState = new ActiveState(); public WpsStateMachine(Context context, WifiStateMachine wsm, Handler target) { super(TAG, target.getLooper()); @@ -82,7 +82,7 @@ class WpsStateMachine extends HierarchicalStateMachine { * HSM states *******************************************************/ - class DefaultState extends HierarchicalState { + class DefaultState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -128,7 +128,7 @@ class WpsStateMachine extends HierarchicalStateMachine { } } - class ActiveState extends HierarchicalState { + class ActiveState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); @@ -182,7 +182,7 @@ class WpsStateMachine extends HierarchicalStateMachine { } } - class InactiveState extends HierarchicalState { + class InactiveState extends State { @Override public void enter() { if (DBG) Log.d(TAG, getName() + "\n"); |