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:
@@ -6278,6 +6278,8 @@
|
|||||||
|
|
||||||
<!-- [CHAR LIMIT=130] Zen mode settings: visual interruptions: screen is off: summary -->
|
<!-- [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>
|
<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 -->
|
<!-- [CHAR LIMIT=130] Zen mode settings: visual interruptions summary -->
|
||||||
<string name="zen_mode_all_visual_interruptions">Off</string>
|
<string name="zen_mode_all_visual_interruptions">Off</string>
|
||||||
|
@@ -55,6 +55,10 @@ public class ZenModeVisualInterruptionSettings extends ZenModeSettingsBase {
|
|||||||
mPolicy = NotificationManager.from(mContext).getNotificationPolicy();
|
mPolicy = NotificationManager.from(mContext).getNotificationPolicy();
|
||||||
|
|
||||||
mScreenOff = (SwitchPreference) root.findPreference(KEY_SCREEN_OFF);
|
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() {
|
mScreenOff.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
Reference in New Issue
Block a user