Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a05e4583 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Disconnect from AP when teardown requested.

We can leave the driver running if it can't handle quick
start/stop cycles, but we must disconnect when requested.

Bug:8549078
Change-Id: Id2e930fb48ca78bb459b775cba7e9aa31a6c9941
parent 3016244f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2442,6 +2442,9 @@ public class WifiStateMachine extends StateMachine {
                        if (DBG) log("Already in delayed stop");
                        break;
                    }
                    /* disconnect right now, but leave the driver running for a bit */
                    mWifiConfigStore.disableAllNetworks();

                    mInDelayedStop = true;
                    mDelayedStopCounter++;
                    if (DBG) log("Delayed stop message " + mDelayedStopCounter);
@@ -2462,6 +2465,9 @@ public class WifiStateMachine extends StateMachine {
                        mDelayedStopCounter++;
                        mAlarmManager.cancel(mDriverStopIntent);
                        if (DBG) log("Delayed stop ignored due to start");
                        if (mOperationalMode == CONNECT_MODE) {
                            mWifiConfigStore.enableAllNetworks();
                        }
                    }
                    break;
                case CMD_DELAYED_STOP_DRIVER: