Merge "Don\'t reference the notification led if it doesn\'t exist." into nyc-dev

am: d3c07da6e9

* commit 'd3c07da6e916c128b20adee3c1ccfd845725cdee':
  Don't reference the notification led if it doesn't exist.
This commit is contained in:
Julia Reynolds
2016-03-08 21:32:24 +00:00
committed by android-build-merger
2 changed files with 6 additions and 0 deletions

View File

@@ -6278,6 +6278,8 @@
<!-- [CHAR LIMIT=130] Zen mode settings: visual interruptions: screen is off: summary -->
<string name="zen_mode_screen_off_summary">Prevent notifications silenced by Do Not Disturb from turning on the screen or pulsing the notification light</string>
<!-- [CHAR LIMIT=130] Zen mode settings: visual interruptions: screen is off: summary -->
<string name="zen_mode_screen_off_summary_no_led">Prevent notifications silenced by Do Not Disturb from turning on the screen</string>
<!-- [CHAR LIMIT=130] Zen mode settings: visual interruptions summary -->
<string name="zen_mode_all_visual_interruptions">Off</string>

View File

@@ -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) {