move some system services from gservices to secure settings

Change-Id: Ie2dfb99a2b42b2cc9310b858c044d8684e3493fa
This commit is contained in:
Doug Zongker
2010-01-07 12:09:54 -08:00
parent 6414970ac7
commit 43866e0c48
9 changed files with 202 additions and 192 deletions

View File

@@ -113,8 +113,8 @@ public class WifiService extends IWifiManager.Stub {
private final IBatteryStats mBatteryStats;
/**
* See {@link Settings.Gservices#WIFI_IDLE_MS}. This is the default value if a
* Settings.Gservices value is not present. This timeout value is chosen as
* See {@link Settings.Secure#WIFI_IDLE_MS}. This is the default value if a
* Settings.Secure value is not present. This timeout value is chosen as
* the approximate point at which the battery drain caused by Wi-Fi
* being enabled but not active exceeds the battery drain caused by
* re-establishing a connection to the mobile data network.
@@ -1317,11 +1317,12 @@ public class WifiService extends IWifiManager.Stub {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
long idleMillis = Settings.Gservices.getLong(mContext.getContentResolver(),
Settings.Gservices.WIFI_IDLE_MS, DEFAULT_IDLE_MILLIS);
long idleMillis =
Settings.Secure.getLong(mContext.getContentResolver(),
Settings.Secure.WIFI_IDLE_MS, DEFAULT_IDLE_MILLIS);
int stayAwakeConditions =
Settings.System.getInt(mContext.getContentResolver(),
Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
Settings.System.getInt(mContext.getContentResolver(),
Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
if (action.equals(Intent.ACTION_SCREEN_ON)) {
Log.d(TAG, "ACTION_SCREEN_ON");
mAlarmManager.cancel(mIdleIntent);