Merge "Some of header changes for partial convo settings" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e9c530e9e8
@@ -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"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user