Loading core/java/android/provider/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -1708,6 +1708,7 @@ public final class Settings { VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE, VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE, VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE, VIBRATE_IN_SILENT, TEXT_AUTO_REPLACE, TEXT_AUTO_CAPS, TEXT_AUTO_PUNCTUATE, Loading packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -70,4 +70,7 @@ <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string> <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string> <!-- Default for Settings.System.VIBRATE_IN_SILENT --> <bool name="def_vibrate_in_silent">true</bool> </resources> packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +24 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,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 = 52; private static final int DATABASE_VERSION = 53; private Context mContext; Loading Loading @@ -634,6 +634,25 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 52; } if (upgradeVersion == 52) { // new vibration/silent mode settings db.beginTransaction(); try { SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT, R.bool.def_vibrate_in_silent); stmt.close(); db.setTransactionSuccessful(); } finally { db.endTransaction(); } upgradeVersion = 53; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion + ", must wipe the settings provider"); Loading Loading @@ -930,6 +949,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadUISoundEffectsSettings(stmt); loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT, R.bool.def_vibrate_in_silent); stmt.close(); } Loading Loading
core/java/android/provider/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -1708,6 +1708,7 @@ public final class Settings { VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE, VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE, VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE, VIBRATE_IN_SILENT, TEXT_AUTO_REPLACE, TEXT_AUTO_CAPS, TEXT_AUTO_PUNCTUATE, Loading
packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -70,4 +70,7 @@ <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string> <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string> <!-- Default for Settings.System.VIBRATE_IN_SILENT --> <bool name="def_vibrate_in_silent">true</bool> </resources>
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +24 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,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 = 52; private static final int DATABASE_VERSION = 53; private Context mContext; Loading Loading @@ -634,6 +634,25 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 52; } if (upgradeVersion == 52) { // new vibration/silent mode settings db.beginTransaction(); try { SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT, R.bool.def_vibrate_in_silent); stmt.close(); db.setTransactionSuccessful(); } finally { db.endTransaction(); } upgradeVersion = 53; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion + ", must wipe the settings provider"); Loading Loading @@ -930,6 +949,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadUISoundEffectsSettings(stmt); loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT, R.bool.def_vibrate_in_silent); stmt.close(); } Loading