summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-10-19 13:39:33 +0200
committerDanny Baumann <dannybaumann@web.de>2016-10-27 05:12:02 -0700
commita12c0a3ff1fdaecf15813de454a5db2de966d5e5 (patch)
treed45d1e222067a377c6f42a8deb9ae8a6493cb6ed /res
parent046fc5c488de05cdfe6dc3a979c2d94d007b8b0b (diff)
downloadpackages_apps_Settings-a12c0a3ff1fdaecf15813de454a5db2de966d5e5.zip
packages_apps_Settings-a12c0a3ff1fdaecf15813de454a5db2de966d5e5.tar.gz
packages_apps_Settings-a12c0a3ff1fdaecf15813de454a5db2de966d5e5.tar.bz2
Add setup UI for minimum delay between an app's notification sounds.
Change-Id: I70e9cc308b4f7c7681457a0b09dd73e5d1aebb73
Diffstat (limited to 'res')
-rw-r--r--res/values/cm_arrays.xml21
-rw-r--r--res/values/cm_strings.xml11
-rw-r--r--res/xml/app_notification_settings.xml10
3 files changed, 41 insertions, 1 deletions
diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml
index 35b2bf7..57375d9 100644
--- a/res/values/cm_arrays.xml
+++ b/res/values/cm_arrays.xml
@@ -589,4 +589,25 @@
<item>@string/security_settings_fingerprint_sensor_location_right</item>
</string-array>
+ <!-- Display settings. The delay in inactivity before the screen is turned off. These are shown in a list dialog. -->
+ <string-array name="app_notification_sound_timeout_entries" translatable="false">
+ <item>@string/app_notification_sound_timeout_value_none</item>
+ <item>@string/app_notification_sound_timeout_value_10_seconds</item>
+ <item>@string/app_notification_sound_timeout_value_30_seconds</item>
+ <item>@string/app_notification_sound_timeout_value_1_minute</item>
+ <item>@string/app_notification_sound_timeout_value_5_minutes</item>
+ <item>@string/app_notification_sound_timeout_value_15_minutes</item>
+ <item>@string/app_notification_sound_timeout_value_30_minutes</item>
+ </string-array>
+
+ <!-- Do not translate. -->
+ <string-array name="app_notification_sound_timeout_values" translatable="false">
+ <item>0</item>
+ <item>10000</item>
+ <item>30000</item>
+ <item>60000</item>
+ <item>300000</item>
+ <item>900000</item>
+ <item>1800000</item>
+ </string-array>
</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index a28a772..4ef248c 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -1238,6 +1238,17 @@
<string name="app_notification_no_ongoing_on_keyguard_title">Disable persistent notification on lock screen</string>
<string name="app_notification_no_ongoing_on_keyguard_summary">Never show persistent notifications from this app on the lock screen</string>
+ <!-- Notification sound timeout -->
+ <string name="app_notification_sound_timeout_title">Minimum time between notification sounds</string>
+ <string name="app_notification_sound_timeout_summary_template">Allow sounds or vibration no more than once every <xliff:g id="duration">%1$s</xliff:g></string>
+ <string name="app_notification_sound_timeout_value_none">No restriction</string>
+ <string name="app_notification_sound_timeout_value_10_seconds">10 seconds</string>
+ <string name="app_notification_sound_timeout_value_30_seconds">30 seconds</string>
+ <string name="app_notification_sound_timeout_value_1_minute">1 minute</string>
+ <string name="app_notification_sound_timeout_value_5_minutes">5 minutes</string>
+ <string name="app_notification_sound_timeout_value_15_minutes">10 minutes</string>
+ <string name="app_notification_sound_timeout_value_30_minutes">30 minutes</string>
+
<!-- CmRadioInfo -->
<string name="cm_radio_info_label">Enhanced radio control</string>
diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml
index f438e2f..11057f3 100644
--- a/res/xml/app_notification_settings.xml
+++ b/res/xml/app_notification_settings.xml
@@ -66,11 +66,19 @@
android:dependency="show_on_keyguard"
android:persistent="false" />
+ <ListPreference
+ android:key="sound_timeout"
+ android:title="@string/app_notification_sound_timeout_title"
+ android:entries="@array/app_notification_sound_timeout_entries"
+ android:entryValues="@array/app_notification_sound_timeout_values"
+ android:order="7"
+ android:persistent="false" />
+
<!-- App notification preferences -->
<Preference
android:key="app_settings"
android:title="@string/app_notification_preferences"
- android:order="7"
+ android:order="8"
android:persistent="false" />
</PreferenceScreen>