diff options
Diffstat (limited to 'packages/SettingsProvider')
3 files changed, 14 insertions, 2 deletions
diff --git a/packages/SettingsProvider/Android.mk b/packages/SettingsProvider/Android.mk index bf4ab1b..a2ea554 100644 --- a/packages/SettingsProvider/Android.mk +++ b/packages/SettingsProvider/Android.mk @@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_JAVA_LIBRARIES := +LOCAL_JAVA_LIBRARIES := telephony-common LOCAL_PACKAGE_NAME := SettingsProvider LOCAL_CERTIFICATE := platform diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index cd0da5a..2c9a6fe 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -46,6 +46,8 @@ <bool name="def_netstats_enabled">true</bool> <bool name="def_usb_mass_storage_enabled">true</bool> <bool name="def_wifi_on">false</bool> + <!-- 0 == default, 1 == never while plugged, 2 == never --> + <integer name="def_wifi_sleep_policy">0</integer> <bool name="def_networks_available_notification_on">true</bool> <bool name="def_backup_enabled">false</bool> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 384e8af..7430f57 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -33,12 +33,14 @@ import android.net.ConnectivityManager; import android.os.SystemProperties; import android.provider.Settings; import android.provider.Settings.Secure; +import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; import com.android.internal.content.PackageHelper; import com.android.internal.telephony.BaseCommands; import com.android.internal.telephony.Phone; +import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.RILConstants; import com.android.internal.util.XmlUtils; import com.android.internal.widget.LockPatternUtils; @@ -1540,6 +1542,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadIntegerSetting(stmt, Settings.System.POINTER_SPEED, R.integer.def_pointer_speed); + loadIntegerSetting(stmt, Settings.System.WIFI_SLEEP_POLICY, + R.integer.def_wifi_sleep_policy); } finally { if (stmt != null) stmt.close(); } @@ -1603,6 +1607,12 @@ public class DatabaseHelper extends SQLiteOpenHelper { SystemProperties.get("ro.com.android.dataroaming", "false")) ? 1 : 0); + // Mobile Data default, based on build + loadSetting(stmt, Settings.Secure.MOBILE_DATA, + "true".equalsIgnoreCase( + SystemProperties.get("ro.com.android.mobiledata", + "true")) ? 1 : 0); + loadBooleanSetting(stmt, Settings.Secure.INSTALL_NON_MARKET_APPS, R.bool.def_install_non_market_apps); @@ -1630,7 +1640,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // Set the preferred network mode to 0 = Global, CDMA default int type; - if (BaseCommands.getLteOnCdmaModeStatic() == Phone.LTE_ON_CDMA_TRUE) { + if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) { type = Phone.NT_MODE_GLOBAL; } else { type = SystemProperties.getInt("ro.telephony.default_network", |
