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

Commit 7c9bf7ca authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Don't init wifiChannels until after supplicant up

The supplicant can take up to 15 seconds to start - setting the number of wifi channels
immediately after requested wifi start often will fail.

Changed to set the number of channels when the supplicant is reported as alive.

bug:2083601
parent d68781ac
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -374,13 +374,6 @@ public class WifiService extends IWifiManager.Stub {
        }
        setWifiEnabledState(eventualWifiState, uid);

        /*
         * Initialize the number of allowed radio channels if Wi-Fi is being turned on.
         */
        if (enable) {
            mWifiStateTracker.setNumAllowedChannels();
        }

        return true;
    }

+3 −0
Original line number Diff line number Diff line
@@ -784,6 +784,9 @@ public class WifiStateTracker extends NetworkStateTracker {
                    mBluetoothA2dp = new BluetoothA2dp(mContext);
                }
                checkIsBluetoothPlaying();

                // initialize this after the supplicant is alive
                setNumAllowedChannels();
                break;

            case EVENT_SUPPLICANT_DISCONNECT: