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

Commit d640a97c authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Show new visual effects options in dnd settings

Bug: 74075050
Test: make -j20 RunSettingsRoboTests
Change-Id: Ia629007d1c80b657aaf756d0f6d2edfd89a7f6b4
parent 9a9b8cad
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -738,6 +738,19 @@
                android:value="true" />
        </activity>

        <activity
            android:name="Settings$ZenModeBlockedEffectsSettingsActivity"
            android:label="@string/zen_mode_what_to_block_title"
            android:icon="@drawable/ic_settings_notifications"
            android:exported="true"
            android:taskAffinity="com.android.settings"
            android:parentActivityName="Settings">
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.notification.ZenModeBlockedEffectsSetting" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                       android:value="true" />
        </activity>

        <activity
            android:name="Settings$ZenModeBehaviorSettingsActivity"
            android:label="@string/zen_mode_behavior_settings_title"
+30 −2
Original line number Diff line number Diff line
@@ -6918,8 +6918,8 @@
    <!-- Do not disturb: Title for the Do not Disturb dialog to turn on Do not disturb. [CHAR LIMIT=50]-->
    <string name="zen_mode_settings_turn_on_dialog_title">Turn on Do Not Disturb</string>
    <!-- Do not disturb: Title for the behaviors option and associated settings page. [CHAR LIMIT=30] -->
    <string name="zen_mode_behavior_settings_title">Behavior</string>
    <!-- Do not disturb: Title for the page describing what can bypass DND. [CHAR LIMIT=30] -->
    <string name="zen_mode_behavior_settings_title">Exceptions</string>
    <!-- Do not disturb: Instructions indicating what types of sounds can bypass DND. [CHAR LIMIT=52] -->
    <string name="zen_mode_behavior_allow_title">Allow sounds and vibrations from</string>
@@ -6972,6 +6972,34 @@
    <!--  Do not disturb: Subtitle for the Visual signals option to toggle on/off visual signals/alerts when the screen is on/when screen is off. [CHAR LIMIT=30] -->
    <string name="zen_mode_visual_signals_settings_subtitle">Allow visual signals</string>
    <!-- Do not disturb: what to block title [CHAR LIMIT = 60] -->
    <string name="zen_mode_what_to_block_title">What to block</string>
    <!-- Do not disturb: what to block > effects title [CHAR LIMIT = 60] -->
    <string name="zen_mode_block_effects_title">When notifications arrive</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_sound">Mute sound and vibration</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_intent">Don\'t turn on screen</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_light">Don\'t blink light</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_peek">Don\'t pop notifications on screen</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_status">Hide status bar icons</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_badge">Hide notification dots</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_ambient">Hide from ambient display</string>
    <!-- Do not disturb: what to block option [CHAR LIMIT=NONE] -->
    <string name="zen_mode_block_effect_list">Hide from notification list</string>
    <!-- Do not disturb: what to block summary, only sound and vibration -->
    <string name="zen_mode_block_effect_summary_sound">Sound and vibration</string>
    <!-- Do not disturb: what to block summary, sound vibration and some visual signals-->
    <string name="zen_mode_block_effect_summary_some">Sound, vibration, and some visual signs of notifications</string>
    <!-- Do not disturb: what to block summary, all effects -->
    <string name="zen_mode_block_effect_summary_all">Sound, vibration, and visual signs of notifications</string>
    <!--  Do not disturb: Button to add new automatic rule to DND. [CHAR LIMIT=30] -->
    <string name="zen_mode_add">Add</string>
+45 −65
Original line number Diff line number Diff line
@@ -19,12 +19,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="zen_mode_behavior_settings_page"
    android:title="@string/zen_mode_behavior_settings_title"
    settings:initialExpandedChildrenCount="8">

   <PreferenceCategory
       android:title="@string/zen_mode_behavior_allow_title"
       android:key="zen_mode_behavior_allow_preferences">
    android:title="@string/zen_mode_behavior_settings_title" >

   <!-- Alarms -->
   <SwitchPreference
@@ -70,21 +65,6 @@
       android:key="zen_mode_repeat_callers"
       android:title="@string/zen_mode_repeat_callers" />

   </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/zen_mode_visual_signals_settings_subtitle"
        android:key="zen_mode_visual_signals_preferences">

        <SwitchPreference android:key="zen_mode_screen_on"
                          android:title="@string/zen_mode_screen_on"
                          android:summary="@string/zen_mode_screen_on_summary" />

        <SwitchPreference android:key="zen_mode_screen_off"
                          android:title="@string/zen_mode_screen_off"
                          android:summary="@string/zen_mode_screen_off_summary" />
    </PreferenceCategory>

    <com.android.settingslib.widget.FooterPreference />

</PreferenceScreen>
+61 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:key="zen_mode_block_settings_page">

    <!-- sound vibration -->
    <CheckBoxPreference
        android:key="zen_effect_sound"
        android:title="@string/zen_mode_block_effect_sound"
        android:enabled="false" />

   <PreferenceCategory
       android:title="@string/zen_mode_block_effects_title"
       android:key="zen_mode_block_vis_effects">

       <CheckBoxPreference
           android:key="zen_effect_intent"
           android:title="@string/zen_mode_block_effect_intent" />

       <CheckBoxPreference
           android:key="zen_effect_light"
           android:title="@string/zen_mode_block_effect_light" />

       <CheckBoxPreference
           android:key="zen_effect_peek"
           android:title="@string/zen_mode_block_effect_peek" />

       <CheckBoxPreference
           android:key="zen_effect_status"
           android:title="@string/zen_mode_block_effect_status" />

       <CheckBoxPreference
           android:key="zen_effect_badge"
           android:title="@string/zen_mode_block_effect_badge" />

       <CheckBoxPreference
           android:key="zen_effect_ambient"
           android:title="@string/zen_mode_block_effect_ambient" />

       <CheckBoxPreference
           android:key="zen_effect_list"
           android:title="@string/zen_mode_block_effect_list" />
   </PreferenceCategory>

</PreferenceScreen>
+7 −1
Original line number Diff line number Diff line
@@ -19,7 +19,13 @@
    android:key="zen_mode_settings"
    android:title="@string/zen_mode_settings_title">

    <!-- Priority behavior settings -->
    <!-- What to block (effects) -->
    <Preference
        android:key="zen_mode_block_effects_settings"
        android:title="@string/zen_mode_what_to_block_title"
        android:fragment="com.android.settings.notification.ZenModeBlockedEffectsSettings" />

    <!-- Behavior settings (exceptions) -->
    <Preference
            android:key="zen_mode_behavior_settings"
            android:title="@string/zen_mode_behavior_settings_title"
Loading