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

Commit 35d323a5 authored by Brian Muramatsu's avatar Brian Muramatsu
Browse files

Use global wifi_sleep_policy constants

Bug 7196148

This will get rid of the wifi_sleep_policy has moved log spamming.

Change-Id: I303c8da80289aba183eb1e51f6a006fc40cd1801
parent d3724b95
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1090,14 +1090,14 @@ public class WifiService extends IWifiManager.Stub {
         */
        private boolean shouldWifiStayAwake(int stayAwakeConditions, int pluggedType) {
            //Never sleep as long as the user has not changed the settings
            int wifiSleepPolicy = Settings.System.getInt(mContext.getContentResolver(),
                    Settings.System.WIFI_SLEEP_POLICY,
                    Settings.System.WIFI_SLEEP_POLICY_NEVER);
            int wifiSleepPolicy = Settings.Global.getInt(mContext.getContentResolver(),
                    Settings.Global.WIFI_SLEEP_POLICY,
                    Settings.Global.WIFI_SLEEP_POLICY_NEVER);

            if (wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER) {
            if (wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER) {
                // Never sleep
                return true;
            } else if ((wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
            } else if ((wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
                    (pluggedType != 0)) {
                // Never sleep while plugged, and we're plugged
                return true;