am 7ac190d6: Merge "default wifi sleep policy change" into honeycomb

* commit '7ac190d60d794b5f75b094a0b9a3f666742d42fb':
  default wifi sleep policy change
This commit is contained in:
Irfan Sheriff
2011-01-11 17:28:39 -08:00
committed by Android Git Automerger

View File

@@ -954,8 +954,10 @@ public class WifiService extends IWifiManager.Stub {
* @see #shouldDeviceStayAwake(int, int)
*/
private boolean shouldWifiStayAwake(int stayAwakeConditions, int pluggedType) {
//Never sleep when plugged in 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_DEFAULT);
Settings.System.WIFI_SLEEP_POLICY,
Settings.System.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED);
if (wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER) {
// Never sleep