Merge into jb-mr1-dev
Change-Id: Ia9c5e2295fe61ae0f5275d3ddfd056d9778b66d1
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 024c8fd6..adb63f9 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -1090,14 +1090,14 @@
*/
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;