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

Commit 439970a4 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Some of header changes for partial convo settings

Move everything to it's own line, and remove the package
label since it appears in the button

Test: atest
Fixes: 157766238
Change-Id: Ib0d35c91dbd389bacdb4209c0657a35e944cfc85
parent e03aa8f7
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(