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

Commit bafd663f authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 4d9431ab: Merge "Fix network reload when config is restored" into jb-mr2-dev

* commit '4d9431ab':
  Fix network reload when config is restored
parents d3859994 4d9431ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ class WifiConfigStore {
     * Fetch the list of configured networks
     * and enable all stored networks in supplicant.
     */
    void initialize() {
    void loadAndEnableAllNetworks() {
        if (DBG) log("Loading config and enabling all networks");
        loadConfiguredNetworks();
        enableAllNetworks();
+7 −2
Original line number Diff line number Diff line
@@ -1111,6 +1111,7 @@ public class WifiStateMachine extends StateMachine {
        pw.println("mUserWantsSuspendOpt " + mUserWantsSuspendOpt);
        pw.println("mSuspendOptNeedsDisabled " + mSuspendOptNeedsDisabled);
        pw.println("Supplicant status " + mWifiNative.status());
        pw.println("mEnableBackgroundScan " + mEnableBackgroundScan);
        pw.println();
        mWifiConfigStore.dump(fd, pw, args);
    }
@@ -2121,7 +2122,7 @@ public class WifiStateMachine extends StateMachine {
                    mLastSignalLevel = -1;

                    mWifiInfo.setMacAddress(mWifiNative.getMacAddress());
                    mWifiConfigStore.initialize();
                    mWifiConfigStore.loadAndEnableAllNetworks();
                    initializeWpsDetails();

                    sendSupplicantConnectionChangedBroadcast(true);
@@ -2657,9 +2658,13 @@ public class WifiStateMachine extends StateMachine {
        public void exit() {
            if (mLastOperationMode == SCAN_ONLY_WITH_WIFI_OFF_MODE) {
                setWifiState(WIFI_STATE_ENABLED);
                // Load and re-enable networks when going back to enabled state
                // This is essential for networks to show up after restore
                mWifiConfigStore.loadAndEnableAllNetworks();
                mWifiP2pChannel.sendMessage(CMD_ENABLE_P2P);
            }
            } else {
                mWifiConfigStore.enableAllNetworks();
            }
            mWifiNative.reconnect();
        }
        @Override