summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2014-02-25 12:34:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-25 12:34:13 +0000
commitada31d3d3879f83e9ef1f514b3ed678231f8b279 (patch)
tree6ca0869267299c1375c53bc04e85908cb19cc1f9 /packages
parent1f63810638a54ebfe963a20deb7698236e9855ab (diff)
parent82a6c5c5ff04ab26fde4b3094a8f25da95a0f5f4 (diff)
downloadframeworks_base-ada31d3d3879f83e9ef1f514b3ed678231f8b279.zip
frameworks_base-ada31d3d3879f83e9ef1f514b3ed678231f8b279.tar.gz
frameworks_base-ada31d3d3879f83e9ef1f514b3ed678231f8b279.tar.bz2
Merge "Default Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS=1."
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml3
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java20
2 files changed, 22 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 69f7152..7410b9d 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -183,4 +183,7 @@
<!-- Default for Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE -->
<integer name="def_wifi_scan_always_available">0</integer>
+ <!-- Default for Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1==on -->
+ <integer name="def_lock_screen_show_notifications">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 f316d88..b546689 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -69,7 +69,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
- private static final int DATABASE_VERSION = 98;
+ private static final int DATABASE_VERSION = 99;
private Context mContext;
private int mUserHandle;
@@ -1556,6 +1556,24 @@ public class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = 98;
}
+ if (upgradeVersion == 98) {
+ if (mUserHandle == UserHandle.USER_OWNER) {
+ db.beginTransaction();
+ SQLiteStatement stmt = null;
+ try {
+ stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
+ + " VALUES(?,?);");
+ loadIntegerSetting(stmt, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS,
+ R.integer.def_lock_screen_show_notifications);
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ if (stmt != null) stmt.close();
+ }
+ }
+ upgradeVersion = 99;
+ }
+
// *** Remember to update DATABASE_VERSION above!
if (upgradeVersion != currentVersion) {