Loading core/java/android/app/Notification.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -7158,7 +7158,8 @@ public class Notification implements Parcelable CharSequence conversationTitle = !TextUtils.isEmpty(super.mBigContentTitle) CharSequence conversationTitle = !TextUtils.isEmpty(super.mBigContentTitle) ? super.mBigContentTitle ? super.mBigContentTitle : mConversationTitle; : mConversationTitle; if (!TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) { if (mConversationType == CONVERSATION_TYPE_LEGACY && !TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) { return conversationTitle; return conversationTitle; } } return null; return null; Loading core/java/com/android/internal/widget/ConversationLayout.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,7 @@ public class ConversationLayout extends FrameLayout private CachingIconView mConversationIconBadgeBg; private CachingIconView mConversationIconBadgeBg; private Icon mLargeIcon; private Icon mLargeIcon; private View mExpandButtonContainer; private View mExpandButtonContainer; private View mExpandButtonInnerContainer; private ViewGroup mExpandButtonAndContentContainer; private ViewGroup mExpandButtonAndContentContainer; private NotificationExpandButton mExpandButton; private NotificationExpandButton mExpandButton; private MessagingLinearLayout mImageMessageContainer; private MessagingLinearLayout mImageMessageContainer; Loading Loading @@ -242,6 +243,7 @@ public class ConversationLayout extends FrameLayout mConversationHeader = findViewById(R.id.conversation_header); mConversationHeader = findViewById(R.id.conversation_header); mContentContainer = findViewById(R.id.notification_action_list_margin_target); mContentContainer = findViewById(R.id.notification_action_list_margin_target); mExpandButtonAndContentContainer = findViewById(R.id.expand_button_and_content_container); mExpandButtonAndContentContainer = findViewById(R.id.expand_button_and_content_container); mExpandButtonInnerContainer = findViewById(R.id.expand_button_inner_container); mExpandButton = findViewById(R.id.expand_button); mExpandButton = findViewById(R.id.expand_button); mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize( mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize( R.dimen.conversation_expand_button_top_margin_expanded); R.dimen.conversation_expand_button_top_margin_expanded); Loading Loading @@ -1169,7 +1171,7 @@ public class ConversationLayout extends FrameLayout layoutParams.topMargin = topMargin; layoutParams.topMargin = topMargin; mExpandButton.setLayoutParams(layoutParams); mExpandButton.setLayoutParams(layoutParams); mExpandButtonContainer.setContentDescription(mContext.getText(contentDescriptionId)); mExpandButtonInnerContainer.setContentDescription(mContext.getText(contentDescriptionId)); } } private void updateContentEndPaddings() { private void updateContentEndPaddings() { Loading Loading @@ -1213,7 +1215,7 @@ public class ConversationLayout extends FrameLayout mExpandable = expandable; mExpandable = expandable; if (expandable) { if (expandable) { mExpandButtonContainer.setVisibility(VISIBLE); mExpandButtonContainer.setVisibility(VISIBLE); mExpandButtonContainer.setOnClickListener(onClickListener); mExpandButtonInnerContainer.setOnClickListener(onClickListener); } else { } else { // TODO: handle content paddings to end of layout // TODO: handle content paddings to end of layout mExpandButtonContainer.setVisibility(GONE); mExpandButtonContainer.setVisibility(GONE); Loading core/res/res/layout/notification_template_material_conversation.xml +56 −43 Original line number Original line Diff line number Diff line Loading @@ -245,6 +245,7 @@ android:id="@+id/notification_messaging" android:id="@+id/notification_messaging" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_text_size" android:spacing="@dimen/notification_messaging_spacing" android:spacing="@dimen/notification_messaging_spacing" android:clipToPadding="false" android:clipToPadding="false" android:clipChildren="false" android:clipChildren="false" Loading @@ -263,14 +264,25 @@ <include layout="@layout/notification_material_action_list" /> <include layout="@layout/notification_material_action_list" /> </com.android.internal.widget.RemeasuringLinearLayout> </com.android.internal.widget.RemeasuringLinearLayout> <!--This is dynamically placed between here and at the end of the layout--> <!--This is dynamically placed between here and at the end of the layout. It starts here since <LinearLayout only FrameLayout layout params have gravity--> <FrameLayout android:id="@+id/expand_button_container" android:id="@+id/expand_button_container" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="@dimen/conversation_expand_button_size" android:layout_height="match_parent" android:layout_gravity="end|top" android:layout_gravity="end|top" android:clipChildren="false" android:clipToPadding="false"> <!--This layout makes sure that we can nicely center the expand content in the collapsed layout while the parent makes sure that we're never laid out bigger than the messaging content.--> <LinearLayout android:id="@+id/expand_button_inner_container" android:layout_width="wrap_content" android:layout_height="@dimen/conversation_expand_button_size" android:paddingStart="16dp" android:paddingStart="16dp" android:orientation="horizontal" android:orientation="horizontal" android:layout_gravity="end|top" android:paddingEnd="@dimen/notification_content_margin_end" android:paddingEnd="@dimen/notification_content_margin_end" android:clipToPadding="false" android:clipToPadding="false" android:clipChildren="false" android:clipChildren="false" Loading Loading @@ -312,4 +324,5 @@ android:importantForAccessibility="no" android:importantForAccessibility="no" /> /> </LinearLayout> </LinearLayout> </FrameLayout> </com.android.internal.widget.ConversationLayout> </com.android.internal.widget.ConversationLayout> core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -3866,6 +3866,7 @@ <java-symbol type="id" name="conversation_icon_badge_ring" /> <java-symbol type="id" name="conversation_icon_badge_ring" /> <java-symbol type="id" name="conversation_icon_badge_bg" /> <java-symbol type="id" name="conversation_icon_badge_bg" /> <java-symbol type="id" name="expand_button_container" /> <java-symbol type="id" name="expand_button_container" /> <java-symbol type="id" name="expand_button_inner_container" /> <java-symbol type="id" name="messaging_group_content_container" /> <java-symbol type="id" name="messaging_group_content_container" /> <java-symbol type="id" name="expand_button_and_content_container" /> <java-symbol type="id" name="expand_button_and_content_container" /> <java-symbol type="id" name="conversation_header" /> <java-symbol type="id" name="conversation_header" /> Loading Loading
core/java/android/app/Notification.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -7158,7 +7158,8 @@ public class Notification implements Parcelable CharSequence conversationTitle = !TextUtils.isEmpty(super.mBigContentTitle) CharSequence conversationTitle = !TextUtils.isEmpty(super.mBigContentTitle) ? super.mBigContentTitle ? super.mBigContentTitle : mConversationTitle; : mConversationTitle; if (!TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) { if (mConversationType == CONVERSATION_TYPE_LEGACY && !TextUtils.isEmpty(conversationTitle) && !hasOnlyWhiteSpaceSenders()) { return conversationTitle; return conversationTitle; } } return null; return null; Loading
core/java/com/android/internal/widget/ConversationLayout.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,7 @@ public class ConversationLayout extends FrameLayout private CachingIconView mConversationIconBadgeBg; private CachingIconView mConversationIconBadgeBg; private Icon mLargeIcon; private Icon mLargeIcon; private View mExpandButtonContainer; private View mExpandButtonContainer; private View mExpandButtonInnerContainer; private ViewGroup mExpandButtonAndContentContainer; private ViewGroup mExpandButtonAndContentContainer; private NotificationExpandButton mExpandButton; private NotificationExpandButton mExpandButton; private MessagingLinearLayout mImageMessageContainer; private MessagingLinearLayout mImageMessageContainer; Loading Loading @@ -242,6 +243,7 @@ public class ConversationLayout extends FrameLayout mConversationHeader = findViewById(R.id.conversation_header); mConversationHeader = findViewById(R.id.conversation_header); mContentContainer = findViewById(R.id.notification_action_list_margin_target); mContentContainer = findViewById(R.id.notification_action_list_margin_target); mExpandButtonAndContentContainer = findViewById(R.id.expand_button_and_content_container); mExpandButtonAndContentContainer = findViewById(R.id.expand_button_and_content_container); mExpandButtonInnerContainer = findViewById(R.id.expand_button_inner_container); mExpandButton = findViewById(R.id.expand_button); mExpandButton = findViewById(R.id.expand_button); mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize( mExpandButtonExpandedTopMargin = getResources().getDimensionPixelSize( R.dimen.conversation_expand_button_top_margin_expanded); R.dimen.conversation_expand_button_top_margin_expanded); Loading Loading @@ -1169,7 +1171,7 @@ public class ConversationLayout extends FrameLayout layoutParams.topMargin = topMargin; layoutParams.topMargin = topMargin; mExpandButton.setLayoutParams(layoutParams); mExpandButton.setLayoutParams(layoutParams); mExpandButtonContainer.setContentDescription(mContext.getText(contentDescriptionId)); mExpandButtonInnerContainer.setContentDescription(mContext.getText(contentDescriptionId)); } } private void updateContentEndPaddings() { private void updateContentEndPaddings() { Loading Loading @@ -1213,7 +1215,7 @@ public class ConversationLayout extends FrameLayout mExpandable = expandable; mExpandable = expandable; if (expandable) { if (expandable) { mExpandButtonContainer.setVisibility(VISIBLE); mExpandButtonContainer.setVisibility(VISIBLE); mExpandButtonContainer.setOnClickListener(onClickListener); mExpandButtonInnerContainer.setOnClickListener(onClickListener); } else { } else { // TODO: handle content paddings to end of layout // TODO: handle content paddings to end of layout mExpandButtonContainer.setVisibility(GONE); mExpandButtonContainer.setVisibility(GONE); Loading
core/res/res/layout/notification_template_material_conversation.xml +56 −43 Original line number Original line Diff line number Diff line Loading @@ -245,6 +245,7 @@ android:id="@+id/notification_messaging" android:id="@+id/notification_messaging" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_text_size" android:spacing="@dimen/notification_messaging_spacing" android:spacing="@dimen/notification_messaging_spacing" android:clipToPadding="false" android:clipToPadding="false" android:clipChildren="false" android:clipChildren="false" Loading @@ -263,14 +264,25 @@ <include layout="@layout/notification_material_action_list" /> <include layout="@layout/notification_material_action_list" /> </com.android.internal.widget.RemeasuringLinearLayout> </com.android.internal.widget.RemeasuringLinearLayout> <!--This is dynamically placed between here and at the end of the layout--> <!--This is dynamically placed between here and at the end of the layout. It starts here since <LinearLayout only FrameLayout layout params have gravity--> <FrameLayout android:id="@+id/expand_button_container" android:id="@+id/expand_button_container" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="@dimen/conversation_expand_button_size" android:layout_height="match_parent" android:layout_gravity="end|top" android:layout_gravity="end|top" android:clipChildren="false" android:clipToPadding="false"> <!--This layout makes sure that we can nicely center the expand content in the collapsed layout while the parent makes sure that we're never laid out bigger than the messaging content.--> <LinearLayout android:id="@+id/expand_button_inner_container" android:layout_width="wrap_content" android:layout_height="@dimen/conversation_expand_button_size" android:paddingStart="16dp" android:paddingStart="16dp" android:orientation="horizontal" android:orientation="horizontal" android:layout_gravity="end|top" android:paddingEnd="@dimen/notification_content_margin_end" android:paddingEnd="@dimen/notification_content_margin_end" android:clipToPadding="false" android:clipToPadding="false" android:clipChildren="false" android:clipChildren="false" Loading Loading @@ -312,4 +324,5 @@ android:importantForAccessibility="no" android:importantForAccessibility="no" /> /> </LinearLayout> </LinearLayout> </FrameLayout> </com.android.internal.widget.ConversationLayout> </com.android.internal.widget.ConversationLayout>
core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -3866,6 +3866,7 @@ <java-symbol type="id" name="conversation_icon_badge_ring" /> <java-symbol type="id" name="conversation_icon_badge_ring" /> <java-symbol type="id" name="conversation_icon_badge_bg" /> <java-symbol type="id" name="conversation_icon_badge_bg" /> <java-symbol type="id" name="expand_button_container" /> <java-symbol type="id" name="expand_button_container" /> <java-symbol type="id" name="expand_button_inner_container" /> <java-symbol type="id" name="messaging_group_content_container" /> <java-symbol type="id" name="messaging_group_content_container" /> <java-symbol type="id" name="expand_button_and_content_container" /> <java-symbol type="id" name="expand_button_and_content_container" /> <java-symbol type="id" name="conversation_header" /> <java-symbol type="id" name="conversation_header" /> Loading