diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
commit | 3ada4b5a85fa907989855065179c4661653cd9ad (patch) | |
tree | 6f461e770d8a22dfc0d26c8917086df4c31d5905 /packages/SettingsProvider | |
parent | 5ceb8731615dbbd54e027e09e46e724037e3a809 (diff) | |
parent | 5ccaaff4818af8d48e072cbd2b8b784e5cd0c593 (diff) | |
download | frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.zip frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.gz frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.bz2 |
Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/base into cm-13.0
Change-Id: I008f052e4e27b44457c8343d20f6e1ba943c8e1f
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 3 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 4ffa3ad..d841573 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -228,4 +228,7 @@ <!-- Default protected sms originating address values of Settings.Secure.PROTECTED_SMS_ADDRESSES --> <string-array name="def_protected_sms_list_values"></string-array> + + <!-- Default for Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED --> + <integer name="def_captive_portal_detection_enabled" translatable="false">1</integer> </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 694eda5..385ff08 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -1391,6 +1391,7 @@ class DatabaseHelper extends SQLiteOpenHelper { if (upgradeVersion == 88) { if (mUserHandle == UserHandle.USER_OWNER) { db.beginTransaction(); + SQLiteStatement stmt = null; try { String[] settingsToMove = { Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD, @@ -1410,7 +1411,6 @@ class DatabaseHelper extends SQLiteOpenHelper { Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES, Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS, Settings.Global.CONNECTIVITY_CHANGE_DELAY, - Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED, Settings.Global.CAPTIVE_PORTAL_SERVER, Settings.Global.NSD_ON, Settings.Global.SET_INSTALL_LOCATION, @@ -1426,9 +1426,16 @@ class DatabaseHelper extends SQLiteOpenHelper { Settings.Global.DEFAULT_DNS_SERVER, }; moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true); + + stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)" + + " VALUES(?,?);"); + loadIntegerSetting(stmt, Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED, + R.integer.def_captive_portal_detection_enabled); + stmt.close(); db.setTransactionSuccessful(); } finally { db.endTransaction(); + if (stmt != null) stmt.close(); } } upgradeVersion = 89; @@ -2752,7 +2759,6 @@ class DatabaseHelper extends SQLiteOpenHelper { R.bool.def_guest_user_enabled); loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED, ImsConfig.FeatureValueConstants.ON); - /* * IMPORTANT: Do not add any more upgrade steps here as the global, * secure, and system settings are no longer stored in a database @@ -2760,6 +2766,8 @@ class DatabaseHelper extends SQLiteOpenHelper { * * See: SettingsProvider.UpgradeController#onUpgradeLocked */ + loadIntegerSetting(stmt, Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED, + R.integer.def_captive_portal_detection_enabled); } finally { if (stmt != null) stmt.close(); } |