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

Commit 6154c0e6 authored by Stevie Kideckel's avatar Stevie Kideckel Committed by Automerger Merge Worker
Browse files

Merge "Add a people tile state for dnd" into sc-dev am: e0dcf62f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080411

Change-Id: Iad7327b3c4cbdba584336dc4e41532a879f2e7ec
parents 73579f4d e0dcf62f
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2021 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:id="@+id/item"
    android:background="@drawable/people_tile_suppressed_background"
    android:clipToOutline="true"
    android:padding="8dp"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/person_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <TextView
        android:gravity="start"
        android:id="@+id/text_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:ellipsize="end"
        android:maxLines="2"
        android:singleLine="false"
        android:text="@string/empty_status"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="@dimen/content_text_size_for_medium" />

</LinearLayout>
+64 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2021 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:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:id="@+id/item"
    android:background="@drawable/people_tile_suppressed_background"
    android:clipToOutline="true"
    android:padding="8dp"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"/>

    <ImageView
        android:id="@+id/person_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <TextView
        android:gravity="center"
        android:id="@+id/text_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="2"
        android:singleLine="false"
        android:text="@string/empty_status"
        android:layout_marginTop="@dimen/padding_between_suppressed_layout_items"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="@dimen/content_text_size_for_large" />

    <ImageView
        android:id="@+id/predefined_icon"
        android:tint="?android:attr/textColorSecondary"
        android:layout_marginTop="@dimen/padding_between_suppressed_layout_items"
        android:layout_width="@dimen/regular_predefined_icon"
        android:layout_height="@dimen/regular_predefined_icon"
        tools:ignore="UseAppTint" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"/>

</LinearLayout>
+4 −2
Original line number Diff line number Diff line
@@ -1451,7 +1451,7 @@
    <dimen name="people_space_messages_count_radius">12dp</dimen>
    <dimen name="people_space_widget_background_padding">6dp</dimen>
    <dimen name="required_width_for_medium">136dp</dimen>
    <dimen name="required_width_for_large">138dp</dimen>
    <dimen name="required_width_for_large">120dp</dimen>
    <dimen name="required_height_for_large">168dp</dimen>
    <dimen name="default_width">146dp</dimen>
    <dimen name="default_height">92dp</dimen>
@@ -1470,10 +1470,12 @@
    <dimen name="below_name_text_padding">16dp</dimen>
    <dimen name="above_notification_text_padding">22dp</dimen>
    <dimen name="regular_predefined_icon">18dp</dimen>
    <dimen name="large_predefined_icon">24dp</dimen>
    <dimen name="larger_predefined_icon">24dp</dimen>
    <dimen name="largest_predefined_icon">32dp</dimen>
    <dimen name="availability_dot_status_padding">8dp</dimen>
    <dimen name="availability_dot_notification_padding">12dp</dimen>
    <dimen name="medium_content_padding_above_name">4dp</dimen>
    <dimen name="padding_between_suppressed_layout_items">8dp</dimen>

    <!-- Accessibility floating menu -->
    <dimen name="accessibility_floating_menu_elevation">3dp</dimen>
+2 −0
Original line number Diff line number Diff line
@@ -2952,6 +2952,8 @@
    <string name="people_tile_description">See recent messages, missed calls, and status updates</string>
    <!-- Title text displayed for the Conversation widget [CHAR LIMIT=50] -->
    <string name="people_tile_title">Conversation</string>
    <!-- Text when the Conversation widget when Do Not Disturb is suppressing the notification. [CHAR LIMIT=50] -->
    <string name="paused_by_dnd">Paused by Do Not Disturb</string>
    <!-- Content description text on the Conversation widget when a person has sent a new text message [CHAR LIMIT=150] -->
    <string name="new_notification_text_content_description"><xliff:g id="name" example="Anna">%1$s</xliff:g> sent a message</string>
    <!-- Content description text on the Conversation widget when a person has sent a new image message [CHAR LIMIT=150] -->
+2 −1
Original line number Diff line number Diff line
@@ -211,7 +211,8 @@ class PeopleStoryIconFactory implements AutoCloseable {

        @Override
        public void setColorFilter(ColorFilter colorFilter) {
            // unimplemented
            if (mAvatar != null) mAvatar.setColorFilter(colorFilter);
            if (mBadgeIcon != null) mBadgeIcon.setColorFilter(colorFilter);
        }

        @Override
Loading