From 0817e4634116b7c8e574f9b72693c2b50098a508 Mon Sep 17 00:00:00 2001 From: PaulK Date: Wed, 8 Jun 2011 23:17:43 +0200 Subject: Allow MOBILE_DATA to have a configuration value so it can be used to disable data by default. --- packages/SettingsProvider/res/values/defaults.xml | 1 + .../src/com/android/providers/settings/DatabaseHelper.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 8349fe6..186f22a 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -43,6 +43,7 @@ 1 true + false false true diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index dab7601..62eee27 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -257,6 +257,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT, + Settings.Secure.MOBILE_DATA, Settings.Secure.WIFI_ON, Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE, Settings.Secure.WIFI_WATCHDOG_AP_COUNT, @@ -1118,7 +1119,10 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.USB_MASS_STORAGE_ENABLED, R.bool.def_usb_mass_storage_enabled); - + + loadBooleanSetting(stmt, Settings.Secure.MOBILE_DATA, + R.bool.def_mobile_data); + loadBooleanSetting(stmt, Settings.Secure.WIFI_ON, R.bool.def_wifi_on); loadBooleanSetting(stmt, Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, -- cgit v1.1