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

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

am cc5dd18d: Merge "Change order of ps and suspendmode calls" into jb-mr1-dev

* commit 'cc5dd18d':
  Change order of ps and suspendmode calls
parents 2b098223 cc5dd18d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1771,15 +1771,18 @@ public class WifiStateMachine extends StateMachine {
        }

        /* Disable power save and suspend optimizations during DHCP */
        mWifiNative.setPowerSave(false);
        // Note: The order here is important for now. Brcm driver changes
        // power settings when we control suspend mode optimizations.
        // TODO: Remove this comment when the driver is fixed.
        setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, false);
        mWifiNative.setPowerSave(false);
    }


    void handlePostDhcpSetup() {
        /* Restore power save and suspend optimizations */
        mWifiNative.setPowerSave(true);
        setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, true);
        mWifiNative.setPowerSave(true);

        // Set the coexistence mode back to its default value
        mWifiNative.setBluetoothCoexistenceMode(
@@ -2710,8 +2713,6 @@ public class WifiStateMachine extends StateMachine {
                mWifiNative.stopFilteringMulticastV4Packets();
            }

            mWifiNative.setPowerSave(true);

            if (mIsScanMode) {
                mWifiNative.setScanResultHandling(SCAN_ONLY_MODE);
                mWifiNative.disconnect();
@@ -2736,6 +2737,7 @@ public class WifiStateMachine extends StateMachine {
                mWifiNative.setSuspendOptimizations(mSuspendOptNeedsDisabled == 0
                        && mUserWantsSuspendOpt.get());
            }
            mWifiNative.setPowerSave(true);

            if (mP2pSupported) mWifiP2pChannel.sendMessage(WifiStateMachine.CMD_ENABLE_P2P);
        }