Skip to content

Commit ecfc9ca

Browse files
author
Jean-Baptiste Queru
committed
Merge into jb-mr1-dev
Change-Id: Ia9c5e2295fe61ae0f5275d3ddfd056d9778b66d1
2 parents d336460 + 35d323a commit ecfc9ca

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)