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

Commit 023bd503 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Some of header changes for partial convo settings" into rvc-dev am:...

Merge "Some of header changes for partial convo settings" into rvc-dev am: e9c530e9 am: cbb943e9 am: d422eb40 am: 7884f90f

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

Change-Id: I67ab3ec1855973e507bf1117d5a5a5f46b32b6ae
parents 8abe9a74 7884f90f
Loading
Loading
Loading
Loading
+7 −26
Original line number Diff line number Diff line
@@ -52,39 +52,20 @@
            android:gravity="center_vertical"
            android:layout_alignEnd="@id/conversation_icon"
            android:layout_toEndOf="@id/conversation_icon">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="start"
                android:orientation="horizontal">
            <TextView
                android:id="@+id/name"
                    android:layout_width="wrap_content"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:textDirection="locale"
                style="@style/TextAppearance.NotificationImportanceChannel"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    style="@style/TextAppearance.NotificationImportanceHeader"
                    android:layout_marginStart="2dp"
                    android:layout_marginEnd="2dp"
                    android:text="@*android:string/notification_header_divider_symbol" />
            <TextView
                android:id="@+id/parent_channel_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@style/TextAppearance.NotificationImportanceChannel"/>

            </LinearLayout>
            <TextView
                android:id="@+id/pkg_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationImportanceChannelGroup"
                android:ellipsize="end"
                android:textDirection="locale"
                android:maxLines="1"/>
                style="@style/TextAppearance.NotificationImportanceChannel"/>
            <TextView
                android:id="@+id/group_name"
                android:layout_width="match_parent"
+0 −1
Original line number Diff line number Diff line
@@ -241,7 +241,6 @@ public class PartialConversationInfo extends LinearLayout implements
        } catch (PackageManager.NameNotFoundException e) {
            mPkgIcon = mPm.getDefaultActivityIcon();
        }
        ((TextView) findViewById(R.id.pkg_name)).setText(mAppName);
    }

    private void bindDelegate() {
+0 −19
Original line number Diff line number Diff line
@@ -160,25 +160,6 @@ public class PartialConversationInfoTest extends SysuiTestCase {
        mEntry = new NotificationEntryBuilder().setSbn(mSbn).build();
    }

    @Test
    public void testBindNotification_SetsTextApplicationName() throws Exception {
        when(mMockPackageManager.getApplicationLabel(any())).thenReturn("App Name");
        mInfo.bindNotification(
                mMockPackageManager,
                mMockINotificationManager,
                mChannelEditorDialogController,
                TEST_PACKAGE_NAME,
                mNotificationChannel,
                mNotificationChannelSet,
                mEntry,
                null,
                true,
                false);
        final TextView textView = mInfo.findViewById(R.id.pkg_name);
        assertTrue(textView.getText().toString().contains("App Name"));
        assertEquals(VISIBLE, mInfo.findViewById(R.id.header).getVisibility());
    }

    @Test
    public void testBindNotification_SetsName() {
        mInfo.bindNotification(