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

Commit 994fb0bf authored by DvTonder's avatar DvTonder Committed by Gerrit Code Review
Browse files

Settings: Allow/Prevent notification light in Zen mode (2 of 3)

This allows the user to prevent the notification lights from showing during Zen mode

Change-Id: Ia3563d79f5c1fc012411496c7b8901099a78282e
parent 72e1c290
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@
    <string name="notification_light_voicemail_title">Voicemail</string>
    <string name="notification_light_brightness" translatable="false">@string/brightness</string>
    <string name="notification_light_screen_on">Lights with screen on</string>
    <string name="notification_light_zen_mode">Lights in Do Not Disturb mode</string>
    <string name="notification_light_use_multiple_leds">Multiple LEDs</string>
    <string name="keywords_lights_brightness_level">dim leds brightness</string>
    <string name="notification_light_automagic">Choose colors automatically</string>
+6 −0
Original line number Diff line number Diff line
@@ -61,6 +61,12 @@
            android:title="@string/notification_light_screen_on"
            android:dependency="notification_light_pulse" />

        <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
            android:key="allow_lights"
            android:title="@string/notification_light_zen_mode"
            android:dependency="notification_light_pulse"
            android:defaultValue="true" />

        <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
            android:key="notification_light_pulse_custom_enable"
            android:title="@string/notification_light_use_custom"
+5 −0
Original line number Diff line number Diff line
@@ -57,4 +57,9 @@
        android:title="@string/zen_mode_repeat_callers"
        android:persistent="false"/>

    <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
        android:key="zen_priority_allow_lights"
        android:title="@string/notification_light_title"
        android:defaultValue="true" />

</PreferenceScreen>
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
    private static final String KEY_MESSAGES = "messages";
    private static final String KEY_CALLS = "calls";
    private static final String KEY_REPEAT_CALLERS = "repeat_callers";
    private static final String KEY_ALLOW_LIGHTS = "zen_priority_allow_lights";

    private static final int SOURCE_NONE = -1;

@@ -145,6 +146,12 @@ public class ZenModePrioritySettings extends ZenModeSettingsBase implements Inde
            }
        });

        // Remove of the "Allow notification light" setting if LED is not supported
        if (!getResources().getBoolean(
                com.android.internal.R.bool.config_intrusiveNotificationLed)) {
            root.removePreference(findPreference(KEY_ALLOW_LIGHTS));
        }

        updateControls();
    }