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

Commit ea360d68 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Redesign zen visual effects screens" into pi-dev

parents 070238df 4cf8bfd5
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -738,23 +738,6 @@
                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">
            <intent-filter android:priority="1">
                <action android:name="android.settings.ZEN_MODE_BLOCKED_EFFECTS_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.notification.ZenModeBlockedEffectsSettings" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                       android:value="true" />
        </activity>

        <activity
            android:name=".notification.ZenOnboardingActivity"
            android:label="@string/zen_onboarding_dnd_visual_disturbances_header"
+90 −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.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:gravity="center_vertical"
    android:background="@android:color/transparent"
    android:clipToPadding="false">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="?android:attr/selectableItemBackground"
        android:gravity="start|center_vertical"
        android:clipToPadding="false">

        <LinearLayout
            android:id="@+id/checkbox_frame"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:minWidth="56dp"
            android:layout_marginEnd="16dp"
            android:orientation="vertical">
            <RadioButton
                android:id="@android:id/checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:background="@null"
                android:focusable="false"
                android:clickable="false" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:paddingTop="16dp"
            android:paddingBottom="16dp">

            <TextView
                android:id="@android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceListItem"
                android:ellipsize="marquee" />

            <TextView
                android:id="@android:id/summary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@android:id/title"
                android:layout_alignStart="@android:id/title"
                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
                android:textColor="?android:attr/textColorSecondary"
                android:maxLines="10" />

        </RelativeLayout>
    </LinearLayout>

    <include layout="@layout/preference_two_target_divider" />

    <LinearLayout
        android:id="@android:id/widget_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center"
        android:minWidth="64dp"
        android:orientation="vertical" />

</LinearLayout>
+26 −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.
-->

<!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
     inside android.R.layout.preference. -->
<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/checkbox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:background="@null"
    android:focusable="false"
    android:clickable="false" />
+32 −1
Original line number Diff line number Diff line
@@ -7223,8 +7223,39 @@
    <!--  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: restrict notifications title [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_screen_title">Restrict notifications</string>
    <!-- Do not disturb: restrict notifications title [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_title">Notifications</string>
    <!-- Do not disturb: restrict notifications category title [CHAR LIMIT=100] -->
    <string name="zen_mode_restrict_notifications_category">When Do Not Disturb is turned on</string>
    <!-- Do not disturb: Mute notifications option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_mute">Mute notifications</string>
    <!-- Do not disturb:Mute notifications summary [CHAR LIMIT=NONE] -->
    <string name="zen_mode_restrict_notifications_mute_summary">Show notifications but mute sounds &amp; vibrations</string>
    <!-- Do not disturb:Mute notifications footer [CHAR LIMIT=NONE] -->
    <string name="zen_mode_restrict_notifications_mute_footer">When new notifications arrive your phone won\u2019t make a sound or vibration</string>
    <!-- Do not disturb: Hide notifications option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_hide">Hide &amp; mute notifications</string>
    <!-- Do not disturb: Hide notifications summary [CHAR LIMIT=NONE] -->
    <string name="zen_mode_restrict_notifications_hide_summary">Notifications will not appear at all</string>
    <!-- Do not disturb: Hide notifications footer [CHAR LIMIT=NONE] -->
    <string name="zen_mode_restrict_notifications_hide_footer">You won\u2019t see new or existing notifications when Do Not Disturb is on. However, notifications needed for basic phone activity and status will still appear.</string>
    <!-- Do not disturb: Custom settings option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_custom">Custom</string>
    <!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_enable_custom">Enable custom setting</string>
    <!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_disable_custom">Remove custom setting</string>
    <!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_summary_muted">Will appear</string>
    <!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_summary_custom">Partially hidden</string>
    <!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
    <string name="zen_mode_restrict_notifications_summary_hidden">Hidden</string>
    <!-- Do not disturb: what to block title [CHAR LIMIT = 60] -->
    <string name="zen_mode_what_to_block_title">Block visual disturbances</string>
    <string name="zen_mode_what_to_block_title">Custom restrictions</string>
    <!-- Do not disturb: what to block > effects title [CHAR LIMIT = 60] -->
    <string name="zen_mode_block_effects_screen_on">When the screen is on</string>
    <!-- Do not disturb: what to block > effects title [CHAR LIMIT = 60] -->
+43 −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_restrict_settings_page"
    android:title="@string/zen_mode_restrict_notifications_screen_title">

    <PreferenceCategory
        android:key="restrict_category"
        android:title="@string/zen_mode_restrict_notifications_category">
        <com.android.settings.notification.ZenCustomRadioButtonPreference
            android:key="zen_mute_notifications"
            android:title="@string/zen_mode_restrict_notifications_mute"
            android:summary="@string/zen_mode_restrict_notifications_mute_summary"/>

        <com.android.settings.notification.ZenCustomRadioButtonPreference
            android:key="zen_hide_notifications"
            android:title="@string/zen_mode_restrict_notifications_hide"
            android:summary="@string/zen_mode_restrict_notifications_hide_summary"/>

        <com.android.settings.notification.ZenCustomRadioButtonPreference
            android:key="zen_custom"
            android:title="@string/zen_mode_restrict_notifications_custom" />

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

</PreferenceScreen>
Loading