From 184da33bba918b92786c17472e29d2a3a5ed0dde Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 8 Mar 2016 16:23:03 -0500 Subject: [PATCH] Don't reference the notification led if it doesn't exist. Bug: 27318491 Change-Id: Ic43f1e8c0c7cf376b19278ab6c2661abc1052ddb --- res/values/strings.xml | 2 ++ .../notification/ZenModeVisualInterruptionSettings.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index 2679da0e5cb..cf8eed90864 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -6278,6 +6278,8 @@ Prevent notifications silenced by Do Not Disturb from turning on the screen or pulsing the notification light + + Prevent notifications silenced by Do Not Disturb from turning on the screen Off diff --git a/src/com/android/settings/notification/ZenModeVisualInterruptionSettings.java b/src/com/android/settings/notification/ZenModeVisualInterruptionSettings.java index a951a6911aa..0a0acd18f92 100644 --- a/src/com/android/settings/notification/ZenModeVisualInterruptionSettings.java +++ b/src/com/android/settings/notification/ZenModeVisualInterruptionSettings.java @@ -55,6 +55,10 @@ public class ZenModeVisualInterruptionSettings extends ZenModeSettingsBase { mPolicy = NotificationManager.from(mContext).getNotificationPolicy(); mScreenOff = (SwitchPreference) root.findPreference(KEY_SCREEN_OFF); + if (!getResources() + .getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed)) { + mScreenOff.setSummary(R.string.zen_mode_screen_off_summary_no_led); + } mScreenOff.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) {