From 8f2fb65b360ebc7ed71ddbc884451536e5e99c03 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Tue, 1 Dec 2009 19:06:14 -0800 Subject: [PATCH] Setting in Sound & Display for trackball pulsing on notification. Bug #2238250 --- res/values/bools.xml | 21 +++++++++ res/values/strings.xml | 4 ++ res/xml/sound_and_display_settings.xml | 10 +++- .../android/settings/SoundAndDisplaySettings.java | 55 ++++++++++++++++------ 4 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 res/values/bools.xml diff --git a/res/values/bools.xml b/res/values/bools.xml new file mode 100644 index 0000000000..cc816c0df0 --- /dev/null +++ b/res/values/bools.xml @@ -0,0 +1,21 @@ + + + + + + false + diff --git a/res/values/strings.xml b/res/values/strings.xml index 68b955f9e5..8ae9209b37 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -877,6 +877,10 @@ Notification ringtone Set your default notification ringtone + + Pulse notification light + + Pulse trackball light repeatedly for new notifications Incoming call volume diff --git a/res/xml/sound_and_display_settings.xml b/res/xml/sound_and_display_settings.xml index 8544fee740..c597a0ae55 100644 --- a/res/xml/sound_and_display_settings.xml +++ b/res/xml/sound_and_display_settings.xml @@ -17,7 +17,7 @@ - - + + + = 1) { @@ -303,7 +329,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements } } - if (KEY_SCREEN_TIMEOUT.equals(preference.getKey())) { + if (KEY_SCREEN_TIMEOUT.equals(key)) { int value = Integer.parseInt((String) objValue); try { Settings.System.putInt(getContentResolver(), @@ -311,7 +337,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements } catch (NumberFormatException e) { Log.e(TAG, "could not persist screen timeout setting", e); } - } else if (KEY_EMERGENCY_TONE.equals(preference.getKey())) { + } else if (KEY_EMERGENCY_TONE.equals(key)) { int value = Integer.parseInt((String) objValue); try { Settings.System.putInt(getContentResolver(), @@ -320,8 +346,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements Log.e(TAG, "could not persist emergency tone setting", e); } } - + return true; } - } -- 2.11.0