diff options
author | Amith Yamasani <yamasani@google.com> | 2011-12-05 19:58:48 -0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2011-12-06 14:48:38 -0800 |
commit | 6243edd818b84adfbe712d5d233d6414b33653ac (patch) | |
tree | 8f6ee51bc79caa36157a05bed45dc7c22805a9bf /packages/SettingsProvider | |
parent | 40cb30c2df2176c03f24cbdc194e3af5a4f64758 (diff) | |
download | frameworks_base-6243edd818b84adfbe712d5d233d6414b33653ac.zip frameworks_base-6243edd818b84adfbe712d5d233d6414b33653ac.tar.gz frameworks_base-6243edd818b84adfbe712d5d233d6414b33653ac.tar.bz2 |
New and improved silent mode on lockscreen.
3-state item to toggle between Silent/Vibrate/Ringer in long-press power menu.
No volume dialog on lockscreen, unless Power menu is up.
Set VIBRATE_IN_SILENT=1 when upgrading device.
Change-Id: I097d216f96c4abdbd83420e0c477106951b3607d
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 6258652..1fbe08d 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -63,7 +63,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 = 72; + private static final int DATABASE_VERSION = 73; private Context mContext; @@ -961,6 +961,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, R.bool.def_accessibility_speak_password); + db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); @@ -968,6 +969,23 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 72; } + if (upgradeVersion == 72) { + // update vibration settings + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)" + + " VALUES(?,?);"); + loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT, + R.bool.def_vibrate_in_silent); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } + upgradeVersion = 73; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { |