Loading core/java/android/app/notification.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -385,3 +385,13 @@ flag { description: "Shows summarized notifications in the UI" bug: "390217880" } flag { name: "nm_collapsed_lines" namespace: "systemui" description: "Shows 2 lines for collapsed notifications by default" bug: "390217880" metadata { purpose: PURPOSE_BUGFIX } } core/java/com/android/internal/widget/ConversationLayout.java +16 −4 Original line number Diff line number Diff line Loading @@ -401,9 +401,19 @@ public class ConversationLayout extends FrameLayout @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; mMessagingLinearLayout.setMaxDisplayedLines(isCollapsed ? TextUtils.isEmpty(mSummarizedContent) ? 1 : MAX_SUMMARIZATION_LINES : Integer.MAX_VALUE); int maxLines = Integer.MAX_VALUE; if (isCollapsed) { if (!TextUtils.isEmpty(mSummarizedContent)) { maxLines = MAX_SUMMARIZATION_LINES; } else { if (android.app.Flags.nmCollapsedLines()) { maxLines = 2; } else { maxLines = 1; } } } mMessagingLinearLayout.setMaxDisplayedLines(maxLines); updateExpandButton(); updateContentEndPaddings(); } Loading Loading @@ -1177,7 +1187,9 @@ public class ConversationLayout extends FrameLayout nameOverride = mNameReplacement; } newGroup.setShowingAvatar(!mIsOneToOne && !mIsCollapsed); newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setSingleLine(mIsCollapsed ? !android.app.Flags.nmCollapsedLines() && TextUtils.isEmpty(mSummarizedContent) : false); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); Loading core/java/com/android/internal/widget/MessagingLayout.java +7 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,10 @@ public class MessagingLayout extends FrameLayout @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; if (mIsCollapsed) { mMessagingLinearLayout.setMaxDisplayedLines( android.app.Flags.nmCollapsedLines() ? 2 : 1); } } /** Loading Loading @@ -549,7 +553,9 @@ public class MessagingLayout extends FrameLayout if (sender != mUser && mNameReplacement != null) { nameOverride = mNameReplacement; } newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setSingleLine(mIsCollapsed ? !android.app.Flags.nmCollapsedLines() && TextUtils.isEmpty(mSummarizedContent) : false); newGroup.setShowingAvatar(!mIsCollapsed); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java +1 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import java.util.Objects; */ public class HybridConversationNotificationView extends HybridNotificationView { private static final int MAX_SUMMARIZATION_LINES = 2; private static final int MAX_SUMMARIZATION_LINES = 1; private ImageView mConversationIconView; private TextView mConversationSenderName; private ViewStub mConversationFacePileStub; Loading Loading @@ -295,7 +295,6 @@ public class HybridConversationNotificationView extends HybridNotificationView { if (AsyncHybridViewInflation.isUnexpectedlyInLegacyMode()) return; if (!TextUtils.isEmpty(summarization)) { mConversationSenderName.setVisibility(GONE); titleText = null; contentText = summarization; mTextView.setSingleLine(false); mTextView.setMaxLines(MAX_SUMMARIZATION_LINES); Loading Loading
core/java/android/app/notification.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -385,3 +385,13 @@ flag { description: "Shows summarized notifications in the UI" bug: "390217880" } flag { name: "nm_collapsed_lines" namespace: "systemui" description: "Shows 2 lines for collapsed notifications by default" bug: "390217880" metadata { purpose: PURPOSE_BUGFIX } }
core/java/com/android/internal/widget/ConversationLayout.java +16 −4 Original line number Diff line number Diff line Loading @@ -401,9 +401,19 @@ public class ConversationLayout extends FrameLayout @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; mMessagingLinearLayout.setMaxDisplayedLines(isCollapsed ? TextUtils.isEmpty(mSummarizedContent) ? 1 : MAX_SUMMARIZATION_LINES : Integer.MAX_VALUE); int maxLines = Integer.MAX_VALUE; if (isCollapsed) { if (!TextUtils.isEmpty(mSummarizedContent)) { maxLines = MAX_SUMMARIZATION_LINES; } else { if (android.app.Flags.nmCollapsedLines()) { maxLines = 2; } else { maxLines = 1; } } } mMessagingLinearLayout.setMaxDisplayedLines(maxLines); updateExpandButton(); updateContentEndPaddings(); } Loading Loading @@ -1177,7 +1187,9 @@ public class ConversationLayout extends FrameLayout nameOverride = mNameReplacement; } newGroup.setShowingAvatar(!mIsOneToOne && !mIsCollapsed); newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setSingleLine(mIsCollapsed ? !android.app.Flags.nmCollapsedLines() && TextUtils.isEmpty(mSummarizedContent) : false); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); Loading
core/java/com/android/internal/widget/MessagingLayout.java +7 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,10 @@ public class MessagingLayout extends FrameLayout @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; if (mIsCollapsed) { mMessagingLinearLayout.setMaxDisplayedLines( android.app.Flags.nmCollapsedLines() ? 2 : 1); } } /** Loading Loading @@ -549,7 +553,9 @@ public class MessagingLayout extends FrameLayout if (sender != mUser && mNameReplacement != null) { nameOverride = mNameReplacement; } newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setSingleLine(mIsCollapsed ? !android.app.Flags.nmCollapsedLines() && TextUtils.isEmpty(mSummarizedContent) : false); newGroup.setShowingAvatar(!mIsCollapsed); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java +1 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import java.util.Objects; */ public class HybridConversationNotificationView extends HybridNotificationView { private static final int MAX_SUMMARIZATION_LINES = 2; private static final int MAX_SUMMARIZATION_LINES = 1; private ImageView mConversationIconView; private TextView mConversationSenderName; private ViewStub mConversationFacePileStub; Loading Loading @@ -295,7 +295,6 @@ public class HybridConversationNotificationView extends HybridNotificationView { if (AsyncHybridViewInflation.isUnexpectedlyInLegacyMode()) return; if (!TextUtils.isEmpty(summarization)) { mConversationSenderName.setVisibility(GONE); titleText = null; contentText = summarization; mTextView.setSingleLine(false); mTextView.setMaxLines(MAX_SUMMARIZATION_LINES); Loading