diff options
author | John Spurlock <jspurlock@google.com> | 2014-11-10 14:49:10 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-11-10 14:49:10 -0500 |
commit | 49300d19abcde2f8bd4e8a54e57fb903805f71b6 (patch) | |
tree | 68baec79ea2bd72c486933c0f53d512a4fb727ba | |
parent | 76f0133831693c9a932b8fb336401303fbadfc66 (diff) | |
download | packages_apps_Settings-49300d19abcde2f8bd4e8a54e57fb903805f71b6.zip packages_apps_Settings-49300d19abcde2f8bd4e8a54e57fb903805f71b6.tar.gz packages_apps_Settings-49300d19abcde2f8bd4e8a54e57fb903805f71b6.tar.bz2 |
Settings: Update preference summary per new downtime behavior.
Bug: 16373455
Change-Id: I399b23ed09973c32c60b37612fd714198297b1a7
-rw-r--r-- | res/values/strings.xml | 10 | ||||
-rw-r--r-- | src/com/android/settings/notification/ZenModeSettings.java | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 86f2fd2..6c75728 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5894,8 +5894,14 @@ <!-- [CHAR LIMIT=20] Zen mode settings: End time option --> <string name="zen_mode_end_time">End time</string> - <!-- [CHAR LIMIT=20] Zen mode settings: End time option: Summary text value format --> - <string name="zen_mode_end_time_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string> + <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = priority and end time = next day --> + <string name="zen_mode_end_time_priority_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string> + + <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = none and end time = same day --> + <string name="zen_mode_end_time_none_same_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> or any alarm before</string> + + <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = none and end time = next day --> + <string name="zen_mode_end_time_none_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day or any alarm before</string> <!-- [CHAR LIMIT=20] Notifications settings: Apps section header --> <string name="notification_settings_apps_title">App notifications</string> diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java index 71ff664..99e112c 100644 --- a/src/com/android/settings/notification/ZenModeSettings.java +++ b/src/com/android/settings/notification/ZenModeSettings.java @@ -379,7 +379,15 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index final int startMin = 60 * mConfig.sleepStartHour + mConfig.sleepStartMinute; final int endMin = 60 * mConfig.sleepEndHour + mConfig.sleepEndMinute; final boolean nextDay = startMin >= endMin; - mEnd.setSummaryFormat(nextDay ? R.string.zen_mode_end_time_summary_format : 0); + final int summaryFormat; + if (mConfig.sleepNone) { + summaryFormat = nextDay ? R.string.zen_mode_end_time_none_next_day_summary_format + : R.string.zen_mode_end_time_none_same_day_summary_format; + } else { + summaryFormat = nextDay ? R.string.zen_mode_end_time_priority_next_day_summary_format + : 0; + } + mEnd.setSummaryFormat(summaryFormat); } private void updateControls() { |