Skip to content

Commit 35d323a

Browse files
author
Brian Muramatsu
committed
Use global wifi_sleep_policy constants
Bug 7196148 This will get rid of the wifi_sleep_policy has moved log spamming. Change-Id: I303c8da80289aba183eb1e51f6a006fc40cd1801
1 parent d3724b9 commit 35d323a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/java/com/android/server/WifiService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,14 +1090,14 @@ public void onReceive(Context context, Intent intent) {
10901090
*/
10911091
private boolean shouldWifiStayAwake(int stayAwakeConditions, int pluggedType) {
10921092
//Never sleep as long as the user has not changed the settings
1093-
int wifiSleepPolicy = Settings.System.getInt(mContext.getContentResolver(),
1094-
Settings.System.WIFI_SLEEP_POLICY,
1095-
Settings.System.WIFI_SLEEP_POLICY_NEVER);
1093+
int wifiSleepPolicy = Settings.Global.getInt(mContext.getContentResolver(),
1094+
Settings.Global.WIFI_SLEEP_POLICY,
1095+
Settings.Global.WIFI_SLEEP_POLICY_NEVER);
10961096

1097-
if (wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER) {
1097+
if (wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER) {
10981098
// Never sleep
10991099
return true;
1100-
} else if ((wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
1100+
} else if ((wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
11011101
(pluggedType != 0)) {
11021102
// Never sleep while plugged, and we're plugged
11031103
return true;

0 commit comments

Comments
 (0)