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

This commit is contained in:
TreeHugger Robot
2020-06-03 15:40:45 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 48 deletions

View File

@@ -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_height="wrap_content"
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:id="@+id/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/parent_channel_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:textDirection="locale"
style="@style/TextAppearance.NotificationImportanceChannel"/>
<TextView
android:id="@+id/group_name"
android:layout_width="match_parent"

View File

@@ -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() {

View File

@@ -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(