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

Commit 796dc2e9 authored by Paul Zhang's avatar Paul Zhang Committed by Gerrit - the friendly Code Review server
Browse files

WIFI: FIX wifi not auto-connect issue.

If the active network type is wifi, wifi connection type is auto,
auto connect to wifi.

This allows Wifi to auto-connect while wifi disconnected
for unexpected reason.

CRs-Fixed: 633648

Change-Id: I9f7f125cd7ffba18cbf5052e683cb31c6f71c573
parent 159f5340
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -245,7 +245,12 @@ class WifiConfigStore {
    boolean isWifiAutoConn() {
        // If no active network(info == null) and wifi connection type is auto
        // connect, auto connect to wifi.
        return isWifiAuto() && (existActiveNetwork() == -1);
        // If the active network type is wifi, wifi connection type is auto
        // auto connect to wifi. This allows wifi auto-reconnect when
        // wifi disconnected for unexpected reason.
        return isWifiAuto() && ((existActiveNetwork() == -1)
                                  || (existActiveNetwork()
                                       == ConnectivityManager.TYPE_WIFI));
    }

    boolean isDataToWifiAutoConn() {