summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2011-09-17 16:09:14 +0200
committerPaul Kocialkowski <contact@paulk.fr>2012-07-09 12:54:38 +0200
commitc17a7d18fbb255d1aab30e3d5f1e339b345b5580 (patch)
tree49739a0290ff31142156da5d7cdd80b5fd13d529
parenta1bf562175b36a4ed8dde24e1ed9ad9a305bde61 (diff)
downloadframeworks_base-c17a7d18fbb255d1aab30e3d5f1e339b345b5580.zip
frameworks_base-c17a7d18fbb255d1aab30e3d5f1e339b345b5580.tar.gz
frameworks_base-c17a7d18fbb255d1aab30e3d5f1e339b345b5580.tar.bz2
Allow MOBILE_DATA to have a configuration value so it can be used to disable data by default.
This was imported to Replicant 2.3 from commit: https://gitorious.org/replicant/android_frameworks_base/commit/0817e4634116b7c8e574f9b72693c2b50098a508
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml1
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java6
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index fc7a4fa..0605fe9 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -43,6 +43,7 @@
<!-- 0 == mobile, 1 == wifi. -->
<integer name="def_network_preference">1</integer>
<bool name="def_usb_mass_storage_enabled">true</bool>
+ <bool name="def_mobile_data">false</bool>
<bool name="def_wifi_on">false</bool>
<bool name="def_networks_available_notification_on">true</bool>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index f7ec294..1e93c8d 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,
@@ -1144,7 +1145,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,