diff --git a/core/java/com/android/internal/widget/ConversationLayout.java b/core/java/com/android/internal/widget/ConversationLayout.java index f9aae0fe48be7..49cf3e099c55b 100644 --- a/core/java/com/android/internal/widget/ConversationLayout.java +++ b/core/java/com/android/internal/widget/ConversationLayout.java @@ -133,6 +133,7 @@ public class ConversationLayout extends FrameLayout private boolean mExpandable = true; private int mContentMarginEnd; private Rect mMessagingClipRect; + private TextView mAppName; public ConversationLayout(@NonNull Context context) { super(context); @@ -202,6 +203,7 @@ public class ConversationLayout extends FrameLayout R.string.conversation_title_fallback_one_to_one); mFallbackGroupChatName = getResources().getString( R.string.conversation_title_fallback_group_chat); + mAppName = findViewById(R.id.app_name_text); } @RemotableViewMethod @@ -384,6 +386,7 @@ public class ConversationLayout extends FrameLayout } updateIconPositionAndSize(); updateImageMessages(); + updateAppName(); } private void updateImageMessages() { @@ -462,6 +465,10 @@ public class ConversationLayout extends FrameLayout topView.setImageIcon(secondLastIcon); } + private void updateAppName() { + mAppName.setVisibility(mIsCollapsed ? GONE : VISIBLE); + } + /** * update the icon position and sizing */ diff --git a/core/res/res/layout/notification_template_material_conversation.xml b/core/res/res/layout/notification_template_material_conversation.xml index f79ea6282c619..0c4be1a91a04f 100644 --- a/core/res/res/layout/notification_template_material_conversation.xml +++ b/core/res/res/layout/notification_template_material_conversation.xml @@ -174,6 +174,17 @@ /> + + +