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

Commit b642f3cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Visual updates for DND screens"

parents 29a464db b5ea53a9
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -19,8 +19,24 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingVertical="@dimen/zen_mode_button_padding_vertical">

    <TextView
        android:text="@string/zen_mode_settings_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/screen_margin_sides"
        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"/>

    <TextView
        android:text="@string/zen_mode_settings_summary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/screen_margin_sides"
        android:paddingTop="@dimen/zen_mode_button_padding_vertical"
        android:paddingBottom="@dimen/zen_mode_button_padding_vertical"/>

    <Button
        android:id="@+id/zen_mode_settings_turn_on_button"
        style="@style/ActionPrimaryButton"
@@ -29,6 +45,8 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:gravity="center"
        android:paddingTop="@dimen/zen_mode_button_padding_vertical"
        android:text="@string/zen_mode_button_turn_on"/>

    <Button
@@ -39,6 +57,8 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:gravity="center"
        android:paddingTop="@dimen/zen_mode_button_padding_vertical"
        android:text="@string/zen_mode_button_turn_off" />

</LinearLayout>
 No newline at end of file
+38 −14
Original line number Diff line number Diff line
@@ -7605,6 +7605,9 @@
    <!-- Sound: Title for the Do not Disturb option and associated settings page. [CHAR LIMIT=50]-->
    <string name="zen_mode_settings_title">Do Not Disturb</string>
    <!-- Sound: Summary for the Do not Disturb option and associated settings page. [CHAR LIMIT=240]-->
    <string name="zen_mode_settings_summary">Only get notified by important people and apps</string>
    <!-- Subtitle for the Do not Disturb slice. [CHAR LIMIT=50]-->
    <string name="zen_mode_slice_subtitle">Limit interruptions</string>
@@ -7684,7 +7687,7 @@
    <string name="zen_mode_visual_signals_settings_subtitle">Allow visual signals</string>
    <!-- Do not disturb: zen settings screens category title [CHAR LIMIT=100] -->
    <string name="zen_mode_settings_category">When Do Not Disturb is on</string>
    <string name="zen_mode_settings_category">Allow interruptions that make sound</string>
    <!-- Do not disturb: restrict notifications title [CHAR LIMIT=80] -->
    <string name="zen_mode_restrict_notifications_title">Restrict notifications</string>
@@ -7825,15 +7828,19 @@
        <item quantity="other"><xliff:g id="on_count" example="3">%d</xliff:g> schedules can turn on automatically</item>
    </plurals>
    <!-- Do not disturb settings, category header [CHAR LIMIT=120]-->
    <string name="zen_category_behavior">Mute device but allow exceptions</string>
    <!-- Do not disturb settings, exceptions to dnd title [CHAR LIMIT=100]-->
    <string name="zen_category_exceptions">Exceptions</string>
    <!-- Do not disturb settings, category header [CHAR LIMIT=100]-->
    <string name="zen_category_schedule">Schedule</string>
    <!-- Do not disturb settings, main screen, category header [CHAR LIMIT=120]-->
    <string name="zen_category_behavior">Exceptions when Do Not Disturb is on</string>
    <!-- Do not disturb settings, main screen, field, dnd breakthrough [CHAR LIMIT=100]-->
    <string name="zen_category_people">People</string>
    <!-- Do not disturb settings, main screen, field, dnd breakthrough  [CHAR LIMIT=100]-->
    <string name="zen_category_apps">Apps</string>
    <!-- Do not disturb settings, main screen, field, dnd breakthrough  [CHAR LIMIT=100]-->
    <string name="zen_category_exceptions">Alarms &amp; other interruptions</string>
    <!-- Do not disturb settings, main screen, field, schedules [CHAR LIMIT=100]-->
    <string name="zen_category_schedule">Schedules</string>
    <!-- Do not disturb settings, main screen, field, dnd visuals [CHAR LIMIT=100]-->
    <string name="zen_category_visuals">Silenced notifications</string>
    <!-- Do not disturb settings, sound and vibrations exceptions title [CHAR LIMIT=100]-->
    <string name="zen_sound_title">See all exceptions</string>
    <!-- Do not disturb settings, sound and vibrations screen footer [CHAR LIMIT=NONE]-->
    <string name="zen_sound_footer">When Do Not Disturb is on, sound and vibration will be muted, except for the items you allow above.</string>
    <!-- Do not disturb settings, sound and vibrations screen category [CHAR LIMIT=100]-->
@@ -8596,6 +8603,8 @@
        <item quantity="other"><xliff:g id="num_people" example="3">%d</xliff:g> others</item>
    </plurals>
    <string name="zen_mode_conversations_title">Conversations</string>
    <!-- [CHAR LIMIT=40] Zen mode settings: Messages option -->
    <string name="zen_mode_messages">Allow messages</string>
@@ -8636,31 +8645,46 @@
    <string name="zen_mode_from_none_messages">Don\u2019t allow any messages</string>
    <!-- [CHAR LIMIT=80] Zen mode settings: Allow alarms option -->
    <string name="zen_mode_alarms">Allow alarms</string>
    <string name="zen_mode_alarms">Alarms</string>
    <!-- [CHAR LIMIT=NONE] Zen mode settings: Allow alarms summary -->
    <string name="zen_mode_alarms_summary">From timers, alarms, security systems, and other apps</string>
    <!-- [CHAR LIMIT=50] Zen mode settings: Alarms option (ie: sound from alarm clock) -->
    <string name="zen_mode_alarms_list">alarms</string>
    <!-- [CHAR LIMIT=80] Zen mode settings: Allow media (sound from video) to bypass dnd -->
    <string name="zen_mode_media">Play media sounds</string>
    <string name="zen_mode_media">Media sounds</string>
    <!-- [CHAR LIMIT=NONE] Zen mode settings: Allow media (sound from video) to bypass dnd  summary-->
    <string name="zen_mode_media_summary">From videos, games, and other media</string>
    <!-- [CHAR LIMIT=50] Zen mode settings: Media (ie: sound from video) -->
    <string name="zen_mode_media_list">media</string>
    <!-- [CHAR LIMIT=80] Zen mode settings: allow touch sounds to bypass DND  -->
    <string name="zen_mode_system">Allow touch sounds</string>
    <string name="zen_mode_system">Touch sounds</string>
    <!-- [CHAR LIMIT=NONE] Zen mode settings: allow touch sounds to bypass DND summary  -->
    <string name="zen_mode_system_summary">From your keyboard and other buttons</string>
    <!-- [CHAR LIMIT=50] Zen mode settings: System sounds (ie: touch sounds) -->
    <string name="zen_mode_system_list">touch sounds</string>
    <!-- [CHAR LIMIT=80] Zen mode settings: Allow reminder notifications/sounds to bypass DND  -->
    <string name="zen_mode_reminders">Allow reminders</string>
    <string name="zen_mode_reminders">Reminders</string>
    <!-- [CHAR LIMIT=NONE] Zen mode settings: Allow reminder notifications/sounds to bypass DND summary  -->
    <string name="zen_mode_reminders_summary">From tasks and reminders</string>
    <!-- [CHAR LIMIT=50] Zen mode settings: Reminders (ie: calendar reminders are allowed to bypass dnd) -->
    <string name="zen_mode_reminders_list">reminders</string>
    <!-- [CHAR LIMIT=80] Zen mode settings: Allow event notifications/sounds to bypass DND -->
    <string name="zen_mode_events">Allow events</string>
    <string name="zen_mode_events">Events</string>
    <!-- [CHAR LIMIT=NONE] Zen mode settings: Allow event notifications/sounds to bypass DND summary -->
    <string name="zen_mode_events_summary">From upcoming calendar events</string>
    <!-- [CHAR LIMIT=100] Zen mode settings: Allow apps to bypass DND -->
    <string name="zen_mode_bypassing_apps">Allow apps to override</string>
+10 −5
Original line number Diff line number Diff line
@@ -36,27 +36,32 @@
        <!-- Alarms -->
        <SwitchPreference
            android:key="zen_rule_alarms"
            android:title="@string/zen_mode_alarms"/>
            android:title="@string/zen_mode_alarms"
            android:summary="@string/zen_mode_alarms_summary"/>

        <!-- Media -->
        <SwitchPreference
            android:key="zen_rule_media"
            android:title="@string/zen_mode_media"/>
            android:title="@string/zen_mode_media"
            android:summary="@string/zen_mode_media_summary"/>

        <!-- System -->
        <SwitchPreference
            android:key="zen_rule_system"
            android:title="@string/zen_mode_system"/>
            android:title="@string/zen_mode_system"
            android:summary="@string/zen_mode_system_summary"/>

        <!-- Reminders -->
        <SwitchPreference
            android:key="zen_rule_reminders"
            android:title="@string/zen_mode_reminders"/>
            android:title="@string/zen_mode_reminders"
            android:summary="@string/zen_mode_reminders_summary"/>

        <!-- Events -->
        <SwitchPreference
            android:key="zen_rule_events"
            android:title="@string/zen_mode_events"/>
            android:title="@string/zen_mode_events"
            android:summary="@string/zen_mode_events_summary"/>
    </PreferenceCategory>

    <Preference
+67 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020 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"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="zen_mode_people_settings_page"
    android:title="@string/zen_category_people" >

   <PreferenceCategory
       android:title="@string/zen_mode_calls_title"
       android:key="zen_mode_settings_category_calls">
      <!-- Calls -->
      <ListPreference
          android:key="zen_mode_calls"
          android:title="@string/zen_mode_calls"
          android:entries="@array/zen_mode_contacts_calls_entries"
          android:entryValues="@array/zen_mode_contacts_values"/>

      <Preference
          android:key="zen_mode_starred_contacts_callers"
          android:title="@string/zen_mode_starred_contacts_title"/>

      <!-- Repeat callers -->
      <SwitchPreference
          android:key="zen_mode_repeat_callers"
          android:title="@string/zen_mode_repeat_callers_title" />
   </PreferenceCategory>

   <PreferenceCategory
       android:title="@string/zen_mode_messages_title"
       android:key="zen_mode_settings_category_messages">
      <!-- Messages -->
      <ListPreference
          android:key="zen_mode_messages"
          android:title="@string/zen_mode_messages"
          android:entries="@array/zen_mode_contacts_messages_entries"
          android:entryValues="@array/zen_mode_contacts_values"/>

      <Preference
          android:key="zen_mode_starred_contacts_messages"
          android:title="@string/zen_mode_starred_contacts_title"/>
   </PreferenceCategory>

   <PreferenceCategory
       android:title="@string/zen_mode_conversations_title"
       android:key="zen_mode_settings_category_conversations">
   </PreferenceCategory>

   <!-- Footer that shows if user is put into alarms only or total silence mode by an app -->
   <com.android.settingslib.widget.FooterPreference/>

</PreferenceScreen>
+39 −34
Original line number Diff line number Diff line
@@ -19,59 +19,64 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="zen_mode_settings"
    android:title="@string/zen_mode_settings_title">
    android:title=" ">

    <!-- Turn on DND button -->
    <com.android.settingslib.widget.LayoutPreference
        android:key="zen_mode_toggle"
        android:title="@string/zen_mode_settings_title"
        android:selectable="false"
        android:layout="@layout/zen_mode_settings_button"
        settings:allowDividerAbove="true"
        settings:allowDividerBelow="true"
        settings:keywords="@string/keywords_zen_mode_settings"/>

    <PreferenceCategory
        android:key="zen_mode_settings_category_behavior"
        android:title="@string/zen_category_behavior">
        <!-- Calls -->
        <!-- People -->
        <Preference
            android:key="zen_mode_behavior_calls"
            android:title="@string/zen_mode_calls_title"
            android:fragment="com.android.settings.notification.zen.ZenModeCallsSettings" />
            android:key="zen_mode_behavior_people"
            android:title="@string/zen_category_people"
            android:fragment="com.android.settings.notification.zen.ZenModePeopleSettings" />

        <!-- Messages -->
        <!-- Apps -->
        <Preference
            android:key="zen_mode_behavior_messages"
            android:title="@string/zen_mode_messages_title"
            android:fragment="com.android.settings.notification.zen.ZenModeMessagesSettings" />
            android:key="zen_mode_behavior_apps"
            android:title="@string/zen_category_apps"
            android:fragment="com.android.settings.notification.zen.ZenModeBypassingAppsSettings" />

        <!-- All sounds -->
        <Preference
            android:key="zen_sound_vibration_settings"
            android:title="@string/zen_sound_title"
            android:fragment="com.android.settings.notification.zen.ZenModeSoundVibrationSettings"
            android:icon="@drawable/ic_chevron_right_24dp"/>
            android:title="@string/zen_category_exceptions"
            android:fragment="com.android.settings.notification.zen.ZenModeSoundVibrationSettings" />
    </PreferenceCategory>

    <!-- Automatic rules -->
    <Preference
        android:key="zen_mode_automation_settings"
        android:title="@string/zen_mode_automation_settings_title"
        settings:allowDividerAbove="true"
        settings:allowDividerBelow="true"
        android:fragment="com.android.settings.notification.zen.ZenModeAutomationSettings"/>

    <PreferenceCategory
        android:key="zen_mode_settings_advanced"
        settings:initialExpandedChildrenCount="1">

        <!-- What to block (effects) -->
        <Preference
            android:key="zen_mode_block_effects_settings"
            android:title="@string/zen_mode_restrict_notifications_title"
        android:fragment="com.android.settings.notification.zen.ZenModeRestrictNotificationsSettings"
        settings:allowDividerAbove="true"/>
            android:fragment="com.android.settings.notification.zen.ZenModeRestrictNotificationsSettings" />

        <!-- DND duration settings -->
        <com.android.settings.notification.zen.ZenDurationDialogPreference
            android:key="zen_mode_duration_settings"
            android:title="@string/zen_mode_duration_settings_title"
            android:widgetLayout="@null"/>

    <!-- Automatic rules -->
    <Preference
        android:key="zen_mode_automation_settings"
        android:title="@string/zen_mode_automation_settings_title"
        android:fragment="com.android.settings.notification.zen.ZenModeAutomationSettings"/>

    <!-- Turn on DND button -->
    <com.android.settingslib.widget.LayoutPreference
        android:key="zen_mode_toggle"
        android:title="@string/zen_mode_settings_title"
        android:selectable="false"
        android:layout="@layout/zen_mode_settings_button"
        settings:allowDividerAbove="true"
        settings:allowDividerBelow="true"
        settings:keywords="@string/keywords_zen_mode_settings"/>
    </PreferenceCategory>

    <!-- Footer that shows if user is put into alarms only or total silence mode by an app -->
    <com.android.settingslib.widget.FooterPreference/>
Loading