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

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

Merge "Inline noti blocking is now in the form of a question"

parents 22d5e0c2 437cdb14
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -193,10 +193,10 @@
    <dimen name="notification_header_background_height">49.5dp</dimen>

    <!-- The top padding for the notification header -->
    <dimen name="notification_header_padding_top">14dp</dimen>
    <dimen name="notification_header_padding_top">16dp</dimen>

    <!-- The bottom padding for the notification header -->
    <dimen name="notification_header_padding_bottom">13dp</dimen>
    <dimen name="notification_header_padding_bottom">16dp</dimen>

    <!-- The margin at the bottom of the notification header. -->
    <dimen name="notification_header_margin_bottom">5dp</dimen>
+25 −0
Original line number Diff line number Diff line
<!--
  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
  -->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M22,34h4L26,22h-4v12zM24,4C12.95,4 4,12.95 4,24s8.95,20 20,20 20,-8.95 20,-20S35.05,4 24,4zM24,40c-8.82,0 -16,-7.18 -16,-16S15.18,8 24,8s16,7.18 16,16 -7.18,16 -16,16zM22,18h4v-4h-4v4z"/>
</vector>
+86 −62
Original line number Diff line number Diff line
@@ -23,22 +23,21 @@
        android:clickable="true"
        android:orientation="vertical"
        android:paddingStart="@*android:dimen/notification_content_margin_start"
        android:paddingEnd="@*android:dimen/notification_content_margin_end"
        android:background="@color/notification_guts_bg_color"
        android:theme="@*android:style/Theme.DeviceDefault.Light">

    <!-- Package Info -->
    <LinearLayout
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="@*android:dimen/notification_header_height"
        android:layout_height="@dimen/notification_guts_header_height"
        android:clipChildren="false"
        android:paddingTop="@*android:dimen/notification_header_padding_top"
        android:paddingBottom="@*android:dimen/notification_header_padding_bottom"
        android:gravity="center_vertical"
        android:orientation="horizontal" >
        android:clipToPadding="false"
        android:layout_marginTop="@*android:dimen/notification_header_padding_top" >
        <ImageView
            android:id="@+id/pkgicon"
            android:layout_width="@*android:dimen/notification_header_icon_size"
            android:layout_height="@*android:dimen/notification_header_icon_size"
            android:layout_width="@dimen/notification_guts_header_height"
            android:layout_height="@dimen/notification_guts_header_height"
            android:layout_marginEnd="3dp" />
        <TextView
            android:id="@+id/pkgname"
@@ -47,7 +46,9 @@
            android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
            android:layout_marginStart="3dp"
            android:layout_marginEnd="2dp"
            android:singleLine="true"/>
            android:singleLine="true"
            android:layout_centerVertical="true"
            android:layout_toEndOf="@id/pkgicon" />
        <TextView
            android:id="@+id/pkg_group_divider"
            android:layout_width="wrap_content"
@@ -55,7 +56,9 @@
            android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
            android:layout_marginStart="2dp"
            android:layout_marginEnd="2dp"
            android:text="@*android:string/notification_header_divider_symbol"/>
            android:text="@*android:string/notification_header_divider_symbol"
            android:layout_centerVertical="true"
            android:layout_toEndOf="@id/pkgname" />
        <TextView
            android:id="@+id/group_name"
            android:layout_width="wrap_content"
@@ -64,82 +67,103 @@
            android:layout_marginStart="2dp"
            android:layout_marginEnd="2dp"
            android:ellipsize="end"
            android:maxLines="1"/>
    </LinearLayout>
            android:maxLines="1"
            android:layout_centerVertical="true"
            android:layout_toEndOf="@id/pkg_group_divider" />
        <ImageButton
            android:id="@+id/info"
            android:src="@drawable/ic_info"
            android:tint="?android:attr/colorAccent"
            android:layout_width="@dimen/notification_guts_header_height"
            android:layout_height="@dimen/notification_guts_header_height"
            android:contentDescription="@string/notification_more_settings"
            android:background="@drawable/ripple_drawable"
            android:layout_alignParentEnd="true" />
    </RelativeLayout>

    <!-- Channel Info Block -->
    <LinearLayout
        android:id="@+id/prompt"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="20dp"
        android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
        android:layout_marginBottom="@dimen/notification_guts_button_spacing"
        android:layout_marginTop="@*android:dimen/notification_header_padding_top"
        android:orientation="vertical">
        <!-- Channel Text -->

        <!-- Channel Info Block -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            android:orientation="vertical">
            <!-- Channel Name -->
            <TextView
                android:id="@+id/channel_name"
                android:layout_width="0dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginBottom="6dp"
                style="@style/TextAppearance.NotificationInfo.Primary" />
            <!-- Ban Channel Switch -->
            <Switch
                android:id="@+id/channel_enabled_switch"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end|center_vertical"
                android:contentDescription="@string/notification_channel_switch_accessibility"
                android:background="@null" />
        </LinearLayout>
        <!-- Secondary Text - only one shows at a time -->
        <TextView
            android:id="@+id/channel_disabled"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/notification_channel_disabled"
            style="@style/TextAppearance.NotificationInfo.Secondary.Warning" />
            <!-- Question prompt -->
            <TextView
            android:id="@+id/num_channels_desc"
                android:id="@+id/block_prompt"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
            android:text="@string/notification_channel_disabled"
                style="@style/TextAppearance.NotificationInfo.Secondary" />
        <!-- Optional link to app. Only appears if the channel is not disabled -->
        </LinearLayout>

        <!-- Settings and Done buttons -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginTop="@dimen/notification_guts_button_spacing"
            android:gravity="end" >

            <!-- Optional link to app. Only appears if the channel is not disabled and the app
            asked for it -->
            <TextView
                android:id="@+id/app_settings"
                android:text="@string/notification_app_settings"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone"
                android:ellipsize="end"
                android:maxLines="1"
            style="@style/TextAppearance.NotificationInfo.Secondary.Link"/>
    </LinearLayout>

    <!-- Settings and Done buttons -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:orientation="horizontal"
        android:gravity="end"
        android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
        android:layout_marginBottom="8dp" >
                style="@style/TextAppearance.NotificationInfo.Button"/>
            <TextView
            android:id="@+id/more_settings"
            android:text="@string/notification_more_settings"
                android:id="@+id/block"
                android:text="@string/inline_stop_button"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
            android:layout_marginEnd="8dp"
                style="@style/TextAppearance.NotificationInfo.Button"/>
            <TextView
            android:id="@+id/done"
            android:text="@string/notification_done"
                android:id="@+id/keep"
                android:text="@string/inline_keep_button"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginEnd="-8dp"
                style="@style/TextAppearance.NotificationInfo.Button"/>
        </LinearLayout>
    </LinearLayout>
    <RelativeLayout
        android:id="@+id/confirmation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/notification_guts_button_spacing"
        android:layout_marginTop="@*android:dimen/notification_header_padding_top"
        android:visibility="gone"
        android:orientation="horizontal" >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/notification_channel_disabled"
            style="@style/TextAppearance.NotificationInfo.Secondary.Warning"/>
        <TextView
            android:id="@+id/undo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/inline_undo"
            android:layout_alignParentEnd="true"
            android:layout_marginEnd="-8dp"
            style="@style/TextAppearance.NotificationInfo.Button"/>
    </RelativeLayout>
</com.android.systemui.statusbar.NotificationInfo>
+6 −0
Original line number Diff line number Diff line
@@ -148,6 +148,12 @@
    <!-- The space around a notification menu item  -->
    <dimen name="notification_menu_icon_padding">20dp</dimen>

    <!-- The veritical space around the buttons in the inline settings -->
    <dimen name="notification_guts_button_spacing">20dp</dimen>

    <!-- The height of the header in inline settings -->
    <dimen name="notification_guts_header_height">24dp</dimen>

    <!-- The minimum height for the snackbar shown after the snooze option has been chosen. -->
    <dimen name="snooze_snackbar_min_height">56dp</dimen>

+14 −31
Original line number Diff line number Diff line
@@ -1445,38 +1445,22 @@
    <string name="notification_header_default_channel">Notifications</string>

    <!-- Notification Inline Controls: Shown when a channel's notifications are currently blocked -->
    <string name="notification_channel_disabled">You won\'t get these notifications anymore</string>
    <string name="notification_channel_disabled">You won\'t see these notifications anymore</string>

    <!-- Notification: Control panel: Label that shows how many channels are included in this bundle
        of notifications.  Replaces the channel name and only appears when there is more than one channel. -->
    <string name="notification_num_channels"> <xliff:g id="number">%d</xliff:g> notification categories</string>
    <!-- Notification Inline controls: continue receiving notifications prompt, channel level -->
    <string name="inline_keep_showing">Keep showing these notifications?</string>

    <!-- Notification: Control panel: Label that shows when an app has not upgraded to use channels.
        Hints that the user's only option is to block all of the app's notifications. -->
    <string name="notification_default_channel_desc">This app doesn\'t have notification categories</string>
    <!-- Notification inline controls: block notifications button -->
    <string name="inline_stop_button">Stop notifications</string>

    <!-- Notification: Control panel: Label that displays when the app's notifications cannot be blocked. -->
    <string name="notification_unblockable_desc">Notifications from this app can\'t be turned off</string>
    <!-- Notification inline controls: keep getting notifications button -->
    <string name="inline_keep_button">Keep showing</string>

    <!-- Notification: Control panel: Label that shows how many channels this application has
        defined, describing the current notification channel as "1 out of n notification categories from this app". -->
    <plurals name="notification_num_channels_desc">
        <item quantity="one">1 out of <xliff:g id="number">%s</xliff:g> notification category from this app</item>
        <item quantity="other">1 out of <xliff:g id="number">%s</xliff:g> notification categories from this app</item>
    </plurals>
    <!-- Notification Inline controls: continue receiving notifications prompt, app level -->
    <string name="inline_keep_showing_app">Keep showing notifications from this app?</string>

    <!-- Notification: Control panel: For bundles of notifications, this label that lists the
        channels used by the contained notifications.  The first two channels are listed by name,
        followed by "and N others"
        Example: "Friend requests, Friend confirmations"
        Example: "Friend requests, Friend confirmations, and 1 other"
        Example: "Friend requests, Friend confirmations, and 2 others"
    -->
    <string name="notification_channels_list_desc_2"><xliff:g id="channel_name_1">%1$s</xliff:g>, <xliff:g id="channel_name_2">%2$s</xliff:g></string>
    <plurals name="notification_channels_list_desc_2_and_others">
        <item quantity="one"><xliff:g id="channel_name_1">%1$s</xliff:g>, <xliff:g id="channel_name_2">%2$s</xliff:g>, and <xliff:g id="number">%3$d</xliff:g> other</item>
        <item quantity="other"><xliff:g id="channel_name_1">%1$s</xliff:g>, <xliff:g id="channel_name_2">%2$s</xliff:g>, and <xliff:g id="number">%3$d</xliff:g> others</item>
    </plurals>
    <!-- Notification: Control panel: Label that displays when the app's notifications cannot be blocked. -->
    <string name="notification_unblockable_desc">These notifications can\'t be turned off</string>

    <!-- Notification: Control panel: Accessibility description for expanded inline controls view, used
        to control settings about notifications related to the current notification.  -->
@@ -1487,17 +1471,16 @@
    <!-- Notification: Control panel: Accessibility description for switch that is used to enable
        or disable notifications from this channel -->
    <string name="notification_channel_switch_accessibility">Allow notifications from this channel</string>
    <!-- Notification: Control panel: Label for button that launches notification settings. Used
        when this app has defined more than a single channel for notifications. -->
    <string name="notification_all_categories">All Categories</string>
    <!-- Notification: Control panel: Label for button that launches notification settings. Used
        when this app has only defined a single channel for notifications. -->
    <string name="notification_more_settings">More settings</string>
    <!-- Notification: Control panel: Label for a link that launches notification settings in the
        app that sent the notification. -->
    <string name="notification_app_settings">Customize: <xliff:g id="sub_category" example="Work chats">%1$s</xliff:g></string>
    <string name="notification_app_settings">Customize</string>
    <!-- Notification: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] -->
    <string name="notification_done">Done</string>
    <!-- Notification: inline controls: undo block button -->
    <string name="inline_undo">Undo</string>

    <!-- Notification: Menu row: Content description for menu items. [CHAR LIMIT=NONE] -->
    <string name="notification_menu_accessibility"><xliff:g id="app_name" example="YouTube">%1$s</xliff:g> <xliff:g id="menu_description" example="notification controls">%2$s</xliff:g></string>
Loading