Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 184da33b authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Don't reference the notification led if it doesn't exist.

Bug: 27318491
Change-Id: Ic43f1e8c0c7cf376b19278ab6c2661abc1052ddb
parent 3e912e7e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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>
+4 −0
Original line number Diff line number Diff line
@@ -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) {