Loading core/java/android/provider/Settings.java +9 −1 Original line number Diff line number Diff line Loading @@ -1408,6 +1408,13 @@ public final class Settings { */ public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; /** * Whether the notification LED should repeatedly flash when a notification is * pending. The value is boolean (1 or 0). * @hide */ public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading Loading @@ -1462,7 +1469,8 @@ public final class Settings { TTY_MODE, SOUND_EFFECTS_ENABLED, HAPTIC_FEEDBACK_ENABLED, SHOW_WEB_SUGGESTIONS SHOW_WEB_SUGGESTIONS, NOTIFICATION_LIGHT_PULSE }; // Settings moved to Settings.Secure Loading packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,7 @@ <bool name="def_backup_enabled">false</bool> <string name="def_backup_transport" translatable="false"></string> <!-- Default value for whether or not to pulse the notification LED when there is a pending notification --> <bool name="def_notification_pulse">true</bool> </resources> packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +21 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,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 = 42; private static final int DATABASE_VERSION = 43; private Context mContext; Loading Loading @@ -521,6 +521,24 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 42; } if (upgradeVersion == 42) { /* * Initialize new notification pulse setting */ db.beginTransaction(); try { SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE, R.bool.def_notification_pulse); stmt.close(); db.setTransactionSuccessful(); } finally { db.endTransaction(); } upgradeVersion = 43; } if (upgradeVersion != currentVersion) { Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion + ", must wipe the settings provider"); Loading Loading @@ -767,6 +785,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadDefaultHapticSettings(stmt); loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE, R.bool.def_notification_pulse); stmt.close(); } Loading Loading
core/java/android/provider/Settings.java +9 −1 Original line number Diff line number Diff line Loading @@ -1408,6 +1408,13 @@ public final class Settings { */ public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; /** * Whether the notification LED should repeatedly flash when a notification is * pending. The value is boolean (1 or 0). * @hide */ public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading Loading @@ -1462,7 +1469,8 @@ public final class Settings { TTY_MODE, SOUND_EFFECTS_ENABLED, HAPTIC_FEEDBACK_ENABLED, SHOW_WEB_SUGGESTIONS SHOW_WEB_SUGGESTIONS, NOTIFICATION_LIGHT_PULSE }; // Settings moved to Settings.Secure Loading
packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,7 @@ <bool name="def_backup_enabled">false</bool> <string name="def_backup_transport" translatable="false"></string> <!-- Default value for whether or not to pulse the notification LED when there is a pending notification --> <bool name="def_notification_pulse">true</bool> </resources>
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +21 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,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 = 42; private static final int DATABASE_VERSION = 43; private Context mContext; Loading Loading @@ -521,6 +521,24 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 42; } if (upgradeVersion == 42) { /* * Initialize new notification pulse setting */ db.beginTransaction(); try { SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)" + " VALUES(?,?);"); loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE, R.bool.def_notification_pulse); stmt.close(); db.setTransactionSuccessful(); } finally { db.endTransaction(); } upgradeVersion = 43; } if (upgradeVersion != currentVersion) { Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion + ", must wipe the settings provider"); Loading Loading @@ -767,6 +785,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadDefaultHapticSettings(stmt); loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE, R.bool.def_notification_pulse); stmt.close(); } Loading