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

Commit a15dd950 authored by San Mehat's avatar San Mehat Committed by The Android Open Source Project
Browse files

am fa6c7111: WifiService: use wifi association state to determine if we should...

am fa6c7111: WifiService: use wifi association state to determine if we should suspend wifi instead of the existance of an IP address.

Merge commit 'fa6c7111'

* commit 'fa6c7111':
  WifiService: use wifi association state to determine if we should suspend wifi instead of
parents fcc5be99 fa6c7111
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1577,8 +1577,9 @@ public class WifiService extends IWifiManager.Stub {
                 * or plugged in to AC).
                 */
                if (!shouldWifiStayAwake(stayAwakeConditions, mPluggedType)) {
                    if (!mWifiStateTracker.hasIpAddress()) {
                        // do not keep Wifi awake when screen is off if Wifi is not fully active
                    WifiInfo info = mWifiStateTracker.requestConnectionInfo();
                    if (info.getSupplicantState() != SupplicantState.COMPLETED) {
                        // do not keep Wifi awake when screen is off if Wifi is not associated
                        mDeviceIdle = true;
                        updateWifiState();
                    } else {