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

Commit b66516ce authored by Nadia Benbernou's avatar Nadia Benbernou
Browse files

Changes to notification silencing controls.

Bug: 123900504
Test: Manual testing.
Change-Id: Ib0075ac02fdd6f94171dc4470176b06ebcf4be2f
parent 0ec0800d
Loading
Loading
Loading
Loading
+22 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="oval">
    <size android:height="40dp"
          android:width="40dp" />
    <solid android:color="#4285f4" />
    <stroke android:color="#f1f3f4" android:width="1dp" />
</shape>
 No newline at end of file
+22 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="oval">
    <size android:height="40dp"
          android:width="40dp" />
    <solid android:color="#ffffff" />
    <stroke android:color="#f1f3f4" android:width="1dp" />
</shape>
 No newline at end of file
+126 −32
Original line number Original line Diff line number Diff line
@@ -220,48 +220,142 @@ asked for it -->
                    android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
                    android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
                    style="@style/TextAppearance.NotificationInfo.Button"/>
                    style="@style/TextAppearance.NotificationInfo.Button"/>
            </LinearLayout>
            </LinearLayout>


        </RelativeLayout>
        </RelativeLayout>
        <LinearLayout
        <LinearLayout
            android:id="@+id/interruptiveness_settings"
            android:id="@+id/interruptiveness_settings"
            android:layout_width="match_parent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/notification_guts_button_spacing"
            android:orientation="vertical"
            android:visibility="gone">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:layout_marginStart="@dimen/notification_guts_button_side_margin"
                android:layout_marginStart="@dimen/notification_guts_button_side_margin"
                android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
                android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
                android:gravity="center"
                android:gravity="center"
            android:orientation="horizontal"
                android:orientation="horizontal">
            android:visibility="gone">
                <LinearLayout
            <TextView
                android:id="@+id/int_block"
                android:text="@string/inline_block_button"
                    android:layout_width="0dp"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_height="match_parent"
                android:drawableTop="@drawable/ic_notification_block"
                android:drawableTint="?android:attr/colorAccent"
                    android:layout_weight="1"
                    android:layout_weight="1"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">
                    <FrameLayout
                        android:id="@+id/int_block_wrapper"
                        android:padding="4dp"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:gravity="center">
                        <ImageButton
                            android:id="@+id/int_block"
                            android:background="@drawable/circle_white_40dp"
                            android:src="@drawable/ic_notification_block"
                            android:layout_gravity="center"
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:clickable="false"
                            android:tint="@color/GM2_grey_400"
                            style="@style/TextAppearance.NotificationInfo.Button"/>
                            style="@style/TextAppearance.NotificationInfo.Button"/>
                    </FrameLayout>
                    <TextView
                    <TextView
                android:id="@+id/int_silent"
                        android:id="@+id/int_block_label"
                android:text="@string/inline_minimize_button"
                        android:text="@string/inline_block_button"
                        android:layout_gravity="center_horizontal"
                        android:gravity="center"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        style="@style/TextAppearance.NotificationInfo.ButtonLabel"/>
                </LinearLayout>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_height="match_parent"
                android:drawableTop="@drawable/ic_notifications_silence"
                android:drawableTint="?android:attr/colorAccent"
                    android:layout_weight="1"
                    android:layout_weight="1"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">
                    <FrameLayout
                        android:id="@+id/int_silent_wrapper"
                        android:padding="4dp"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:gravity="center">
                        <ImageButton
                            android:id="@+id/int_silent"
                            android:background="@drawable/circle_white_40dp"
                            android:src="@drawable/ic_notifications_silence"
                            android:layout_gravity="center"
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:clickable="false"
                            android:tint="@color/GM2_grey_400"
                            style="@style/TextAppearance.NotificationInfo.Button"/>
                            style="@style/TextAppearance.NotificationInfo.Button"/>
                    </FrameLayout>
                    <TextView
                    <TextView
                android:id="@+id/int_alert"
                        android:id="@+id/int_silent_label"
                android:text="@string/inline_keep_button"
                        android:text="@string/inline_silent_button_silent"
                        android:layout_gravity="center_horizontal"
                        android:gravity="center"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        style="@style/TextAppearance.NotificationInfo.ButtonLabel"/>
                </LinearLayout>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_height="match_parent"
                android:drawableTop="@drawable/ic_notifications_alert"
                android:drawableTint="?android:attr/colorAccent"
                    android:layout_weight="1"
                    android:layout_weight="1"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">
                    <FrameLayout
                        android:id="@+id/int_alert_wrapper"
                        android:padding="4dp"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:gravity="center">
                        <ImageButton
                            android:id="@+id/int_alert"
                            android:background="@drawable/circle_white_40dp"
                            android:src="@drawable/ic_notifications_alert"
                            android:layout_gravity="center"
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:clickable="false"
                            android:tint="@color/GM2_grey_400"
                            style="@style/TextAppearance.NotificationInfo.Button"/>
                    </FrameLayout>
                    <TextView
                        android:id="@+id/int_alert_label"
                        android:text="@string/inline_silent_button_alert"
                        android:layout_gravity="center_horizontal"
                        android:gravity="center"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        style="@style/TextAppearance.NotificationInfo.ButtonLabel"/>
                </LinearLayout>
            </LinearLayout>
            <TextView
                android:id="@+id/hint_text"
                android:layout_marginStart="@*android:dimen/notification_content_margin_start"
                android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationInfo.HintText" />
            <TextView
                android:id="@+id/done_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:paddingRight="24dp"
                android:text="@string/inline_done_button"
                style="@style/TextAppearance.NotificationInfo.Button" />
                style="@style/TextAppearance.NotificationInfo.Button" />
        </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    </LinearLayout>

    <com.android.systemui.statusbar.notification.row.NotificationUndoLayout
    <com.android.systemui.statusbar.notification.row.NotificationUndoLayout
        android:id="@+id/confirmation"
        android:id="@+id/confirmation"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
+10 −1
Original line number Original line Diff line number Diff line
@@ -1608,7 +1608,7 @@
    <string name="inline_silent_button_stay_silent">Stay silent</string>
    <string name="inline_silent_button_stay_silent">Stay silent</string>


    <!-- Notification inline controls: button to make notifications alert the user [CHAR_LIMIT=35] -->
    <!-- Notification inline controls: button to make notifications alert the user [CHAR_LIMIT=35] -->
    <string name="inline_silent_button_alert">Alert me</string>
    <string name="inline_silent_button_alert">Alert</string>


    <!-- Notification inline controls: button to continue alerting the user when notifications arrive [CHAR_LIMIT=35] -->
    <!-- Notification inline controls: button to continue alerting the user when notifications arrive [CHAR_LIMIT=35] -->
    <string name="inline_silent_button_keep_alerting">Keep alerting</string>
    <string name="inline_silent_button_keep_alerting">Keep alerting</string>
@@ -1616,6 +1616,15 @@
    <!-- Notification Inline controls: continue receiving notifications prompt, app level -->
    <!-- Notification Inline controls: continue receiving notifications prompt, app level -->
    <string name="inline_keep_showing_app">Keep showing notifications from this app?</string>
    <string name="inline_keep_showing_app">Keep showing notifications from this app?</string>


    <!-- Hint text for block button in the interruptiveness settings [CHAR_LIMIT=NONE]-->
    <string name="hint_text_block">Blocked notifications do not appear anywhere or play a sound. You can unblock notifications in settings.</string>

    <!-- Hint text for silent button in the interruptiveness settings [CHAR_LIMIT=NONE]-->
    <string name="hint_text_silent">Silent notifications appear in the shade, but do not appear on the lock screen, present a banner, or play a sound.</string>

    <!-- Hint text for alert button in the interruptiveness settings [CHAR_LIMIT=NONE]-->
    <string name="hint_text_alert">Alerted notifications appear in the shade, on the lock screen, present a banner, and play a sound.</string>

    <!-- Notification: Control panel: Label that displays when the app's notifications cannot be blocked. -->
    <!-- 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>
    <string name="notification_unblockable_desc">These notifications can\'t be turned off</string>


+13 −0
Original line number Original line Diff line number Diff line
@@ -445,6 +445,19 @@
        <item name="android:alpha">0.54</item>
        <item name="android:alpha">0.54</item>
    </style>
    </style>


    <style name="TextAppearance.NotificationInfo.ButtonLabel">
        <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
        <item name="android:textSize">14sp</item>
        <item name="android:alpha">0.54</item>
        <item name="android:paddingTop">4dp</item>
        <item name="android:paddingBottom">16dp</item>
    </style>

    <style name="TextAppearance.NotificationInfo.HintText">
        <item name="android:textSize">12sp</item>
        <item name="android:alpha">0.54</item>
    </style>

    <style name="TextAppearance.NotificationInfo.Secondary.Warning">
    <style name="TextAppearance.NotificationInfo.Secondary.Warning">
        <item name="android:textColor">?android:attr/colorError</item>
        <item name="android:textColor">?android:attr/colorError</item>
    </style>
    </style>
Loading